CodeIgniter 在函数中显示图像时遇到问题detail
。在函数index
中,它们被显示。有人可以告诉我问题出在哪里吗?
class Reference extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('reference_model');
}
public function index()
{
$data['work'] = $this->reference_model->getList();
$menu['page'] = "Reference";
$menu['pages'] = $this->pages->getPages();
$this->basic_template->set('title','Reference | DSVision');
$this->basic_template->menu('menu_view',$menu);
$this->basic_template->script('reference_script_view');
$this->basic_template->view('basic_script', 'reference_view',$data);
}
public function detail($number)
{
if($this->reference_model->exist($number) == 0)
redirect('reference');
$data['id'] = $number;
$data['work'] = $this->reference_model->getWork($number);
$menu['page'] = "Reference";
$menu['pages'] = $this->pages->getPages();
$this->basic_template->set('title','Reference | DSVision');
$this->basic_template->menu('menu_view',$menu);
$this->basic_template->view('basic', 'detail_view',$data);
}
}