I have Placed the codeigniter code controller and it throws a error Call to undefined method CI_Controller::CI_Controller().Pls help me to rectify the issue. Controller:
<?php
class Site1 extends CI_Controller
{
function __construct()
{
parent::CI_Controller ();
$this->is_logged_in();
}
function members_area()
{
$this->load->view('index');
}
function another_page() // just for sample
{
echo 'good. you\'re logged in.';
}
function is_logged_in()
{
$is_logged_in = $this->session->userdata('is_logged_in');
if(!isset($is_logged_in) || $is_logged_in != true)
{
echo 'You don\'t have permission to access this page. <a href="../login">Login</a>';
die();
//$this->load->view('login_form');
}
}
}