php - Class not found error in Lithium Framework (li3) -


i using lithium framework. trying call class controller, class placed inside libraries folder.... showing error

fatal error: class 'app\libraries\test' not found in /home/ali.mehdi/avontph/app/controllers/sessionsagentcontroller.php on line 34

in libraries folder created test.php having following code.

<?php namespace app\libraries; class test{   public static function gettest(){     return "hi";   } } 

also inside controller.. used following using statements:

use app\libraries\test; 

but why test class not found... missing something? appreciated.

as @matei mihai has commented, in app\config\bootstrap\libraries.php add line libraries::add('.'), though i'd advise against (see below).

be aware best practice put classes package , not drop them in libraries folder.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -