CodeIgniter : Unable to load the requested file:

Carl Michaels picture Carl Michaels · May 18, 2012 · Viewed 123.5k times · Source

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

Laurence picture Laurence · May 18, 2012

try

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

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