help uploading a codeigniter project to a live server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: help uploading a codeigniter project to a live server (/showthread.php?tid=61107) |
help uploading a codeigniter project to a live server - El Forum - 09-18-2014 [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');?> help uploading a codeigniter project to a live server - El Forum - 09-18-2014 [eluser]rajneeshgobin[/eluser] $config['base_url'] = 'http://localhost/yourwebsite'; have u changed this url? help uploading a codeigniter project to a live server - El Forum - 09-19-2014 [eluser]InsiteFX[/eluser] Also some web servers require that all file names be in lowercase. help uploading a codeigniter project to a live server - El Forum - 09-20-2014 [eluser]webdevdesi[/eluser] Problem solved! Thanks for answering me. I uploaded the project to a different server and everything works! |