[eluser]Andychan[/eluser]
Hi, I'm come from Hong Kong. Is a Codeigniter novice.
As usual, I make a site with php
will have three part - header.php , main.php , footer.php
And then use rquire_once / include_once combined them
header.php for the detect login or not, and title variable etc.
I'm not sure the CI concept, if I make a simple site, only three page
I will.........
Quote:index.php, index_view.php
about.php, about_view.php
contact.php, contact_view.php
header.php (At View)
footer.php (At View)
every page include header.php and footer.php
if About.php , I want to get some $data , I need to write
Code:
$data['title'] = xxx;
Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class About extends CI_Controller {
public function index(){
// layout part
$this->load->view('header');
$this->load->view('about_view');
$this->load->view('footer');
}
}
/* End of file about.php */
for the repeat use, I will put it into header.php,
but about_view.php cannot get the $a
How can I do?
please help, thanks !!!