Problem with load lib - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Problem with load lib (/showthread.php?tid=87201) |
Problem with load lib - mazz - 03-24-2023 Hi, I need to use this library: https://github.com/PayU-EMEA/openpayu_php so I installed it with this command: Quote:composer require openpayu/openpayu In controller I have this code: PHP Code: <?php I have this error: Quote:Class "OpenPayU_Configuration" not found Should I add something to Config/Autoload.php? @edit: I added this to config/Autoload.php: PHP Code: public $psr4 = [ In Controller I have: PHP Code: use OpenPayU\Configuration as OpenPayU_Configuration; and error is still. RE: Problem with load lib - mazz - 03-24-2023 Solution In controller I have: PHP Code: use OpenPayU_Configuration; and it works! |