Hello everyone I have a site controller code as below..... when I try to execute this code I get a weird problem, If I take out the __construct() function everything works pretty well for me, but, as soon as I add that constructor function I get the error 500 internal server error can any one help me out ??
<?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();
}
}
}