I want to load a main view from my controller in CodeIgniter 3.0, but instead of showing the view, the page shows the "Object of class CI_Loader could not be converted to string", and the view I want to show is on the top of my page not in the center of my page.
Here is the error screenshot :
This is my controller:
if($this->session->userdata('logged_in')){
$data['utama'] = $this->load->view('spvcoll/v_list');
$data['judul'] = 'List Assign';
$this->load->view('v_index',$data);
}else{
redirect('c_index');
}
Here I want to call the variable:
<?php echo $utama;?>
TRY This
$data['utama'] = $this->load->view('spvcoll/v_list', TRUE);
Instead of
$data['utama'] = $this->load->view('spvcoll/v_list');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.