日期:2014-05-17  浏览次数:20424 次

找不到控制器
本人在使用zend framework时出的一个错误,就是在打开首页index.php的时候都可以正常显示
但打开其它页面都无法显示(例如127.0.0.1/news),但在Controllers文件夹中是存在NewsController.php这个文件的
显示如下错误:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in D:\web\ztw\Zend\Controller\Dispatcher\Standard.php:248 Stack trace: #0 D:\web\ztw\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 F:\myphp\index.php(9): Zend_Controller_Front->dispatch() #2 {main} thrown in D:\web\ztw\Zend\Controller\Dispatcher\Standard.php on line 248


反正就是首页正常,其实都打不开,求解。

------解决方案--------------------
controller -> action

没有指定actiong,默认是index,如果view里面没有index.phtml文件,肯定就会报错了