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
Post a Comment