![]() |
New to CodeIgniter need help with startup tutorial - 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: New to CodeIgniter need help with startup tutorial (/showthread.php?tid=50344) |
New to CodeIgniter need help with startup tutorial - El Forum - 03-23-2012 [eluser]Peace-N[/eluser] Hi Im new to CI I just downloaded and set up my development environment, there ia this code adding logic to the controller where do I put it, do I put in pages.php ? After pasting the code my home.php shows blank ? public function view($page = 'home') { if ( ! file_exists('application/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); } Help, Help ? |