Is it possible to store libraries in sub folders in codeigniter? For example would something like this work?
-libraries
---sub_folder1
-----someClass.php
---sub_filder2
-----someClass2.php
If it does how should I load and use these libraries?
Library files can be stored in subdirectories within the main "libraries" folder, or within your personal application/libraries folder. To load a file located in a subdirectory, simply include the path, relative to the "libraries" folder. For example, if you have file located at:
libraries/flavors/chocolate.php
You will load it using:
$this->load->library('flavors/chocolate');
You may nest the file in as many subdirectories as you want.
Explained on the loader class manual page
https://codeigniter.com/user_guide/libraries/loader.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With