【发布时间】:2016-01-07 17:35:25
【问题描述】:
我有一个 Zend 框架项目,以前由其他程序员完成了一半。有了它,另一个应用程序直接桥接到Zend 的public/hrm 文件夹下的公共文件夹。
应用程序似乎运行正常。但在 apache 错误日志中,我不断发现这些错误。
[Wed Dec 25 12:33:00 2013] [error] [client 127.0.0.1]
PHP Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (hrm)' in /path/to/proj/library/Zend/Controller/Dispatcher/Standard.php:248\n
Stack trace:
\n#0 /path/to/proj/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
\n#1 /path/to/proj/Application/Bootstrap.php(48): Zend_Controller_Front->dispatch()
\n#2 /path/to/proj/public/index.php(30): Application_Bootstrap->run()
\n#3 {main}
\n thrown in /path/to/proj/library/Zend/Controller/Dispatcher/Standard.php on line 248, referer: http://local.hrm.tld/hrm/lib/controllers/CentralController.php?reqcode=EMP&VIEW=MAIN&sortField=0&sortOrder0=ASC&VIEW=MAIN
[Wed Dec 25 12:33:04 2013] [error] [client 127.0.0.1]
PHP Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (hrm)' in /path/to/proj/library/Zend/Controller/Dispatcher/Standard.php:248\nStack trace:
\n#0 /path/to/proj/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
\n#1 /path/to/proj/Application/Bootstrap.php(48): Zend_Controller_Front->dispatch()
\n#2 /path/to/proj/public/index.php(30): Application_Bootstrap->run()
\n#3 {main}
\n thrown in /path/to/proj/library/Zend/Controller/Dispatcher/Standard.php on line 248, referer: http://local.hrm.tld/hrm/lib/controllers/CentralController.php?menu_no_top=hr&id=0008&capturemode=updatemode&reqcode=EMP¤tPage=1
public文件夹中.htaccess的内容如下:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
我在这里错过了什么?
【问题讨论】:
标签: php .htaccess zend-framework mod-rewrite url-rewriting