Codeigniter 3 dev Failed to load the requested class

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

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

when I start the site, an error occurs:

 Unable to load the requested class: Input 

When I tried it with CI version 2.2.0, everything is fine, no errors. Can someone explain why and help me solve this problem?

+5
source share
2 answers

By default, loading the library from the system / core folder in you is CI. But the input library is in the main folder, so you need to specify a relative path to Input.php, like this

 $autoload['libraries'] = array('database','../core/input'); 
+4
source

By default, by default.

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

Documentation for startup http://www.codeigniter.com/userguide3/general/autoloader.html

+3
source

Source: https://habr.com/ru/post/1211716/


All Articles