CodeIgniter görüntülemek için kontrolör dinamik veri geçirmeden

0 Cevap php

Ben bir denetleyici bir görünüm için bir dizi geçirerek. Basit şeyler. Çalışması gerekir, ama çok garip doğrusu davranıyor ve ben hata anlamaya olamaz.

Bu kontrolör-is

$link = "http://" . $server . ".something.com/uploads/" . $name;
$data = array(
    'name' =>$name,
    'server'=>$server,
    'link'=>$link,
    'username'=>$username
    );
$this->load->view('photo_edit', $data); //sending $data to view

Bu görünümü -

<img src = "<?php echo $link; ?>"/>

When the view loads, the $link is just this - http://.something.com/uploads/ But when I echo the $link in the controller, its totally fine (with both the $server and $name showing correctly). There is some issue with passing the $link.

0 Cevap