Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Problem
#1

[eluser]LEECH[/eluser]
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!
#2

[eluser]InsiteFX[/eluser]
Check your base_url in your ./application/config/config.php

You may also need to change the uri_protocol

Also your controller class name you have as home it should be Home
#3

[eluser]LEECH[/eluser]
Should I set my base_url according to my domain url/path I uploaded it?

uri_protocol default was auto.

Sorry, really new at CI.
#4

[eluser]InsiteFX[/eluser]
Yes or you can leave it blank and CodeIgniter will try to figure it out for you.
Code:
$config['base_url'] = '';

protocol try REQUEST_URI

#5

[eluser]LEECH[/eluser]
But it was already blank and uri_protocol was auto, but still I got the err.
Code:
$config['base_url'] = '';
$config['uri_protocol'] = 'AUTO';
I'm sorry about my other post, it will not happen again. Smile
#6

[eluser]InsiteFX[/eluser]
Try this and change your_server to the name of your server!
Code:
$config['base_url'] = 'http://www.your_sever.com/';
$config['uri_protocol'] = 'REQUEST_URI';

If you have an .htaccess file try removing it for now and see if your site works.
#7

[eluser]weboap[/eluser]
shouldn't

Code:
$this->load->view(‘home\home_view’,$data);
be
Code:
$this->load->view(‘home/home_view’,$data);
what operating system are you using locally and remote?
#8

[eluser]LEECH[/eluser]
It finally works! Thanks weboap. Im using windoes locally and my webserver was linux. didn't noticed that, thanks a lot!




Theme © iAndrew 2016 - Forum software by © MyBB