Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter 3 dev Unable to load the requested class

I'm new in CI and now I'm trying to use CodeIgniter 3 to develop my site. I just only extract the framework and change only one think in config/autoload.php file:

$autoload['libraries'] = array('database','input');

when I run the site, an error occur:

Unable to load the requested class: Input

When I tried it with CI version 2.2.0 stable, every thing is OK, no errors Could some one explain why and help me to solve it?

like image 904
ledungtdc Avatar asked Jan 22 '15 17:01

ledungtdc


2 Answers

As of documentation input library is loaded by default.

This class (input) is initialized automatically by the system so there is no need to do it manually.

Autoloading documentation http://www.codeigniter.com/userguide3/general/autoloader.html

like image 127
Kyslik Avatar answered Nov 16 '22 01:11

Kyslik


By default the library load from system/core folder in you CI. But the Input library is located on the core folder so you need to give relative path to the Input.php like this

$autoload['libraries'] = array('database','../core/input');
like image 43
nifCody Avatar answered Nov 16 '22 01:11

nifCody