I’ve managed to get Code Igniter installed (which is an achievement), but following the tutorial “Tutorial − Static pages” I find that I can’t get any page to render. I’ve created the header and footer files, and the home and about files (yes, all in the right directories), but nothing shows in http://www.trainstormbeta.co.uk/ci/index.php/pages/view
I think my main concern is the code:
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);
}
Where should this go?? I’m really confused.
Sorry for the basic nature of this issue, but until I know what’s going on, I’m just stuck!