Ads Inside Post

Search in This Blog

CodeIgniter Undefined property CI_Loader $session codeigniter error

Problem:

If you works in CodeIgniter and play with session then you can get this error message :
Undefined property: CI_Loader::$session

CodeIgniter Undefined property CI_Loader $session codeigniter error

A PHP Error was encountered CodeIgniter
CodeIgniter error

 Severity: Notice
Message: Undefined property: CI_Loader::$session

Solution:

It means that you have not loaded session library in it controller's index or constructor as
$this->load->library('session'); 

Example:

To prevent this error message use listed below code:

public function index() {
        $this->load->library('session');
}