Welcome Guest, Not a member yet? Register   Sign In
code Ignitor controller
#1

<?php
class Pages extends CI_Controller
{
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);
}
}

This is my controller code,how should i run my code?

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
code Ignitor controller - by mohan7310 - 08-13-2015, 02:35 AM
RE: code Ignitor controller - by RobertSF - 08-14-2015, 11:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB