0

I am trying to implement user login using PHP/Zend. Following the example below: https://github.com/ezimuel/Authentication-and-authorization-with-ZF.git

I get the following errors when going to http://localhost/

Warning: include_once(Login/Plugin/SecurityCheck.php) [function.include-once]: failed to open stream: No such file or directory in /Library/WebServer/Documents/xxxxx/library/Zend/Loader.php on line 146

Warning: include_once() [function.include]: Failed opening 'Login/Plugin/SecurityCheck.php' for inclusion (include_path='/Library/WebServer/Documents/xxxxx/application/../library:/Library/WebServer/Documents/xxxxx/library:/Library/WebServer/Documents/xxxxx/application/modules/login/library:.:/usr/lib/php') in /Library/WebServer/Documents/xxxxx/library/Zend/Loader.php on line 146

Fatal error: Class 'Login_Plugin_SecurityCheck' not found in /Library/WebServer/Documents/xxxxx/library/Zend/Application/Resource/Frontcontroller.php on line 117

I setup the project by following the Zend Quickstart Tutorials, so my application.ini file is slightly different. Im guessing this is a simple case of the application not being able to find certain files?

4

1 回答 1

0

你有没有在你的这些行application.ini

resources.frontController.defaultModule = "login"
resources.frontController.params.prefixDefaultModule = "1"
resources.modules[]=
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.plugins[] = "Login_Plugin_SecurityCheck"

另外,我注意到插件在配置中指定为Login_Plugin_SecurityCheck,但在登录模块中,文件夹是plugins,而不是plugin

于 2011-08-24T14:21:01.497 回答