我正在尝试根据“Pro Zend Framework技术 - 构建完整的CMS项目”一书中的说明配置Zend Server CE。
这本书让我做了以下事情:
改变httpd.conf:
DocumentRoot "C:\Program Files\Zend\Apache2/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
为:
DocumentRoot "C:/Program Files/Zend/Apache2/htdocs/rlms/public"
<Directory "C:\Program Files\Zend\Apache2\htdocs\rlms">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
我也在application.ini中改变了:
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
为:
resources.frontController.controllerDirectory = APPLICATION_PATH "/layouts/scripts"
我的反斜杠和/或正斜杠是否有问题?转到http://localhost和http://localhost/rlms/public后,我收到以下堆栈跟踪:
致命错误:C:\ Program Files \ Zend \ ZendServer \ share \ ZendFramework \ library \ Zend \ Controller \ Dispatcher \ Standard.php中未捕获的异常'Zend_Controller_Dispatcher_Exception',消息'指定了无效的控制器(错误)':242堆栈跟踪:#0 C:\ Program Files \ Zend \ ZendServer \ share \ ZendFramework \ library \ Zend \ Controller \ Front.php(946):Zend_Controller_Dispatcher_Standard-&gt; dispatch(Object(Zend_Controller_Request_Http),Object(Zend_Controller_Response_Http))#1C :\ Program Files \ Zend \ ZendServer \ share \ ZendFramework \ library \ Zend \ Application \ Bootstrap \ Bootstrap.php(77):Zend_Controller_Front-&gt; dispatch()#2 C:\ Program Files \ Zend \ ZendServer \ share \ ZendFramework \ library \ Zend \ Application.php(358):Zend_Application_Bootstrap_Bootstrap-&gt; run()#3 C:\ Program Files \ Zend \ Apache2 \ htdocs \ rlms \ public \ index.php(26):Zend_Application-&gt; run( )在第242行的C:\ Program Files \ Zend \ ZendServer \ share \ ZendFramework \ library \ Zend \ Controller \ Dispatcher \ Standard.php中抛出#4 {main}
......任何想法?谢谢!
答案 0 :(得分:0)
没关系,事实证明我需要添加:
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
到application.ini,在我修改控制器路径之前