Carl Michaels Carl Michaels - 5 months ago 202
PHP Question

CodeIgniter : Unable to load the requested file:

Hi I’m just new in codeigniter. My website works locally, but when I uploaded it, I got this error:

An Error Was Encountered
Unable to load the requested file: home\home_view.php

Here is my controller:

<?php
class home extends CI_Controller{

function index(){

$data=array();
if($query=$this->home_model->get_dynamic_main_menu())
{
$data[‘main_menu’] = $query;
}

$this->load->view(‘home\home_view’,$data);
}


}


Thanks!

Answer

try

$this->load->view('home/home_view',$data);

(and note the " ' " not the " ‘ " that you used)

Comments