Alex wood Alex wood - 5 months ago 38
PHP Question

Class 'CI_Driver_Library' not found codeigniter error

I want to use session, so I try to do autoload. In application > config.php, I do

$autoload['libraries'] = array('session');


but I got below error

Message: Class 'CI_Driver_Library' not found

Filename: Session/Session.php

Answer

If your using Codeigniter 3.0 or higher use this:

$autoload['drivers'] = array('session');

Because the session is a driver not a library after version 3.0!

Under Version 2.1 it's a library!