help uploading a codeigniter project to a live server |
[eluser]webdevdesi[/eluser]
I had this codeigniter project that works on localhost, but not on a live server. The links don't work and some of the views won't either. It get a message that says that a requested file can not be loaded. The server is www.000webhost.com I think it has problem with the controllers and some views. The main content view doesn't show, but the side bar and the header work. This is the controller: class Products extends CI_Controller{ public function index(){ //Get All Products $data['products']= $this->Product_model->get_products(); //Load View $data['main_content'] = 'products'; $this->load->view('layouts/main',$data); } public function details($id){ //Get products details $data['product']= $this->Product_model->get_product_details($id); //Load View $data['main_content'] = 'details'; $this->load->view('layouts/main',$data); } } And this is the view: <?php $this->load->view('layouts/includes/header');?> <?php $this->load->view($main_content);?> <?php $this->load->view('layouts/includes/footer');?>
[eluser]rajneeshgobin[/eluser]
$config['base_url'] = 'http://localhost/yourwebsite'; have u changed this url?
[eluser]InsiteFX[/eluser]
Also some web servers require that all file names be in lowercase.
[eluser]webdevdesi[/eluser]
Problem solved! Thanks for answering me. I uploaded the project to a different server and everything works! |
Welcome Guest, Not a member yet? Register Sign In |