Zend framework 无法访问资源插件
我在bootstrap.php中包含了plugin SecurityCheck.php Login\u plugin\u SecurityCheck。第9行Bootstrap.php中的未定义方法Zend_Application::getResource的给定错误->调用。下面是我的代码Zend framework 无法访问资源插件,zend-framework,Zend Framework,我在bootstrap.php中包含了plugin SecurityCheck.php Login\u plugin\u SecurityCheck。第9行Bootstrap.php中的未定义方法Zend_Application::getResource的给定错误->调用。下面是我的代码 class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initPlugins() {
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initPlugins()
{
$bootstrap = $this->getApplication();
$bootstrap->bootstrap('frontcontroller');
$front = $bootstrap->getResource('frontcontroller');
$front->registerPlugin(new Login_Plugin_SecurityCheck());
}
}
如何解决此错误。试试这个
protected function _initPlugins() {
$this->bootstrap('frontController')->getResource('frontController')->registerPlugin(new Login_Plugin_SecurityCheck());
}
frontcontroller的C应该是Capital。谢谢初学者,完成了。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。但现在它的给定错误->未找到类“Login\u Plugin\u SecurityCheck”。我已将此插件包含在C:\xampp\htdocs\zend\bin\zendtest\application\plugins中