External library() |
I have a system made in native php, which I am moving to codeigniter 4, and I need to know how to include other files as shown in the photo. any help I am grateful.
07-03-2021, 08:54 PM
(This post was last modified: 07-04-2021, 02:16 AM by InsiteFX. Edit Reason: Added files array )
You can still include them like that or you can give them all the App\Libraries namespace
and then CodeIgniter would find them. Top of class file use App/Libraries You can have the also autoloaded using App/Config/Autoload.php Look at the bottom of the file there is a files array to add them to. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
you can store those file in App folder, make it name SII,
each file add (namespace represent folder location of your file for autoload to work) <?php namespace App\SII ; -- your class here.. to use those class just add on controller use App\SII\{class-name1,class-name2}, |
Welcome Guest, Not a member yet? Register Sign In |