Here is the folder structure in modules
library
-
users->controllers->Users.php
users->config->autoload.php
welcome->controllers->Welcome.php
autoload.php
$autoload = array(
'helper' => array('url', 'form'),
'libraries' => array('session')
);
Welcome.php (located in modules/welcome/Welcome.php)
class Welcome extends MX_Controller {
public function index()
{
//load module
$this->load->module(array('users'));
}
}
I will get the following error :
Unable to locate the specified class: Session.php
Note:
url
and form
libraries are loaded correctly