Hi everyone, I have a site controller code as shown below ... when I try to execute this code, I get a strange problem. If I select the __construct () function, everything will be fine for me, but as soon as I add that the constructor function I get an error of 500 internal server errors, can anyone help me?
<?php
class site extends CI_Controller
{
function __construct()
{
parent::CI_Controller();
$this->Logged_in();
}
function after_logging()
{
$this->load->view('home');
}
function Logged_in()
{
$is_logged_in = $this->session->userdata('is_logged_in');
if(!isset($is_logged_in)|| $is_logged_in != TRUE)
{
die();
}
}
}
koool source
share