• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to CodeIgniter

#1
[eluser]davy_yg[/eluser]
Hello,

I am new to codeigniter, I am following code igniter tutorial:

Introduction:
Static Pages

Where should I add this codes:

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);

}

I don't really understand the instruction.


Messages In This Thread
New to CodeIgniter - by El Forum - 08-23-2012, 01:41 AM
New to CodeIgniter - by El Forum - 08-23-2012, 01:47 AM
New to CodeIgniter - by El Forum - 08-23-2012, 07:22 AM
New to CodeIgniter - by El Forum - 08-23-2012, 07:40 AM
New to CodeIgniter - by El Forum - 08-23-2012, 07:50 AM
New to CodeIgniter - by El Forum - 08-23-2012, 07:52 AM
New to CodeIgniter - by El Forum - 08-23-2012, 08:31 AM
New to CodeIgniter - by El Forum - 08-23-2012, 08:33 AM
New to CodeIgniter - by El Forum - 08-23-2012, 08:58 AM
New to CodeIgniter - by El Forum - 08-23-2012, 10:07 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.