0

我正在尝试根据“Pro Zend Framework Techniques - Build a Full CMS Project”一书中的说明配置 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://localhosthttp://localhost/rlms/public后,我收到以下堆栈跟踪:

致命错误:在 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php:242 中未捕获异常 'Zend_Controller_Dispatcher_Exception' 并带有消息 'Invalid controller specified (error)' 堆栈跟踪:# 0 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\Program Files \Zend\ZendServer\share\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php(77): Zend_Controller_Front->dispatch() #2 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\ Application.php(358): Zend_Application_Bootstrap_Bootstrap->run() #3 C:\Program Files\Zend\Apache2\htdocs\rlms\public\index.php(26): Zend_Application->run() #4 {main} 在第 242 行抛出 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php

...有任何想法吗?谢谢!

4

1 回答 1

0

没关系,事实证明我需要添加:

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

到 application.ini,在我修改控制器路径之前

于 2010-01-09T06:26:02.780 回答