![]() |
Tutorial Error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Tutorial Error (/showthread.php?tid=59297) |
Tutorial Error - El Forum - 09-17-2013 [eluser]CTheTech[/eluser] On the first part of the tutorial the static pages. I get a 404 constantly. I'm running XAMPP on Windows 7. Here is my code for pages.php " class Page extends CI_Controller { public function view($page = 'home') { /*if (!file_exists(APPPATH. '/views/pages/'.$page.'.php')) { // Whoops, we don't have a page for that! show_404(); }*/ $data['title'] = ucfirst($page); // Capitalize the first letter $this->load->view('templates/header', $data); $this->load->view('pages/'.$page, $data); $this->load->view('templates/footer', $data); } } " It is located in /application/controllers My other pages are located in application/views/templates/footer.php application/views/templates/header.php application/views/pages/about.php application/views/pages/home Tutorial Error - El Forum - 09-17-2013 [eluser]pettersolberg[/eluser] If your controller is really called "pages.php" consider renaming it to "page.php" (as the class name within that file). Tutorial Error - El Forum - 09-18-2013 [eluser]CTheTech[/eluser] That's worked thanks a lot. I'm hoping to get the hang of this Framework. They should change that in the tutorial. |