Welcome Guest, Not a member yet? Register   Sign In
Class 'CI_Controller' not found
#2

Never modify any files in the system folder or subfolders.
Only create or modify files in the application folder and it's subfolders.
The use the session library, autoload it in application/config/autoload.php or just load it into one of your controllers.

The $ci =& get_instance(); method is only necessary in libraries, not in controllers.
In a controller, you must use the $this object to refer to the controller's class.
Example:
PHP Code:
$this->load->library('session');
$this->session->userdetails 'test';
echo 
$this->session->userdetails;
unset(
$_SESSION['userdetails']); 
Reply


Messages In This Thread
Class 'CI_Controller' not found - by Lucy789 - 05-20-2019, 11:49 AM
RE: Class 'CI_Controller' not found - by Wouter60 - 05-20-2019, 01:30 PM
RE: Class 'CI_Controller' not found - by Lucy789 - 05-21-2019, 12:28 AM
RE: Class 'CI_Controller' not found - by InsiteFX - 05-21-2019, 03:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB