我在zend框架上收到以下错误:
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in F:\wamp\www\helloworld\library\Zend\Controller\Dispatcher\Standard.php:245
Stack trace:
#0 F:\wamp\www\helloworld\library\Zend\Controller\Front.php(946):Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 F:\wamp\www\helloworld\library\Zend\Controller\Front.php(212): Zend_Controller_Front->dispatch()
#2 F:\wamp\www\helloworld\web_root\index.php(10): Zend_Controller_Front::run('../application/...')
#3 {main} thrown in F:\wamp\www\helloworld\library\Zend\Controller\Dispatcher\Standard.php on line 245
造成这种情况的原因是什么,我该如何解决?
Sha*_*hid 10
在index.php文件中写
$frontController->setParam('useDefaultControllerAlways', true);
$frontController->dispatch();
或者,您可以在application.ini文件的[production]部分中编写以下行:
resources.frontController.params.useDefaultControllerAlways = 1
您可能已经(重新)移动/编辑了ErrorController.php文件,该文件可以在中找到
/application/controllers/
Run Code Online (Sandbox Code Playgroud)
另一种可能性是您已将应用程序配置为管理不存在的错误控制器.