Class 'CI_Driver_Library' not found.
I want to use session, so I am trying to autoload. In app> config.php i do$autoload['libraries'] = array('session');
but i ended up below error
Message: Class 'CI_Driver_Library' not found
Filename: Session/Session.php
If you are using Codeigniter 3.0
or higher use this:
$autoload['drivers'] = array('session');
Because session
is driver
not a library
after version 3.0!
In the Version 2.1
it is a library
!
app / Config / autoload.php
just add @ Rizier123's answer.
file: url /application/config/config.php
CI Verson
less 3.0
asked cache
and session
as functions library
.
$ autoload [
'libraries'
] = array ('cache'
,'session'
);$ autoload [
'drivers'
] = array ();
And for Verson 3.0 and up
$ autoload [
'libraries'
] = array ();$ autoload [
'drivers'
] = array ('cache'
,'session'
);
remove both from library and then just add it to drivers . You may forget to remove it from library
, it will boot correctly after solving the problem;