Hi, I would like to create a BaseController and extends other controllers from that. So I’ve created a BaseController with this code:
class BaseController extends CController {
}
But if I do:
class OtherController extends BaseController {
}
it gives me this error:
Description
include(BaseController.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
Source File
/var/www/dibevit/framework/YiiBase.php(316)
if you add the the path of protected/controllers to the php include paths then it would work right away without you having to inlclude/require the file with a line of code. what i suggested works only because the path for components is added through the app config here
maybe you could add a line to it saying ‘application.controllers.*’,
I’m not sure what that effect that would have on your app but if you want a more appropriate place to put your base controller then you could try that. (i was ok with placing it in the components directory)