![]() |
Autoload my own library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: Autoload my own library (/showthread.php?tid=87319) |
Autoload my own library - jcarvalho - 04-06-2023 Hi, I made a custom library and is stored inside app/Libraries and the name is Mssql.php it starts like this PHP Code: <?php My autoload.php is like this PHP Code: public $psr4 = [ What am I missing? Thanks! RE: Autoload my own library - iRedds - 04-06-2023 1. First you need to read the php manual about namespaces. So that you understand what you are doing. 2. You need to read the CI documentation on file autoloading. Autoload.php config is not loading files. "This file defines the namespaces and class maps so the Autoloader can find the files as needed." RE: Autoload my own library - InsiteFX - 04-06-2023 READ: CodeIgniter 4 User Guide - CodeIgniter4 Overview - Autoloading Files Eample: PHP Code: // Namespace => Path |