Welcome Guest, Not a member yet? Register   Sign In
unable to load requested file: .php
#1

[eluser]Abdul Shajin[/eluser]
When i tried to run my codeigniter file it shows a error like "unable to load requested file: .php
i tried a lot. and i didn't leave a file blank and all the file which i included is exits..
look this code.
$data['title'] = "Welcome to My First Page";
$data['navlist'] = $this->MCats->getCategoriesNav(); //to get the navigation catetores.
$home['mainf'] = $this->MProducts->getMainfeature(); //get the main feature products
$skip= $home['mainf']['id'];
$home['sidef'] = $this->MProducts->getRandomProducts(3,$skip);

$data['main'] = $this->load->view('home',$home,true);
$this->load->vars($data);
$this->load->view('template');

this is my index clas and the files which load is template.php and home.php ... i dont know which file missing ... i requested to you geeks please help me...
#2

[eluser]Abdul Shajin[/eluser]
ya i got the solution... from now onwards please use $this->load->vars with a php file reference and the data array to which loaded.. so the correct way is

$data['main']= $this->load->view('home',$data);

hav fun

bye.
abner scott




Theme © iAndrew 2016 - Forum software by © MyBB