Hello:
I am going thru the beginning tutorial and I created the controller for pages:
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);
}Problem is I keep getting the 404 error page when I navigate to pages/view. I checked my index.php file in my public_html folder and the application path is set correctly. If I comment out the show_404(); the pages load fine. If I change the path in the if (! file_exists statement to be the full path from the server it works fine. So something is going on with the setting for the default path to the application but I don’t know what. Anyone have any ideas?