controller: Test.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Test extends CI_Controller
{
function __construct()
{
parent :: __construct();
$this->load->helper(array('form', 'url'));
}
public function index()
{
$this->load->view('index');
}
}
view : index.php
<html>
<head>
<title>Welcome</title>
</head>
<body>
<?php include('header.php'); ?>
</body>
</html>
I am new in codeigniter and I want to include header.php file in index.php and I am using include function in view but I think that is not the correct way to include header file inside the index.php then what is the correct way please help me.
Thank You