Php 尝试将zend文件迁移到本地主机时出现异常
我正在尝试运行一个从服务器到本地主机(迁移)的php zend文件。我已经更改了我知道的配置,但当我尝试运行它时,浏览器中会显示以下错误Php 尝试将zend文件迁移到本地主机时出现异常,php,arrays,zend-framework,exception,localhost,Php,Arrays,Zend Framework,Exception,Localhost,我正在尝试运行一个从服务器到本地主机(迁移)的php zend文件。我已经更改了我知道的配置,但当我尝试运行它时,浏览器中会显示以下错误 Array ( [0] => Zend_Controller_Dispatcher_Exception Object ( [message:protected] => Invalid controller specified (www) [string:Exception:private] => [code:prote
Array ( [0] => Zend_Controller_Dispatcher_Exception Object
(
[message:protected] => Invalid controller specified (www)
[string:Exception:private] => [code:protected] => 0
[file:protected] => C:\xampp\htdocs\www\html\library\Zend\Controller\Dispatcher\Standard.php
[line:protected] => 241
[trace:Exception:private] => Array (
[0] => Array (
[file] => C:\xampp\htdocs\www\html\library\Zend\Controller\Front.php
[line] => 936
[function] => dispatch
[class] => Zend_Controller_Dispatcher_Standard
[type] => -> [args] => Array (
[0] => Zend_Controller_Request_Http Object (
[_paramSources:protected] => Array (
[0] => _GET [1] => _POST )
[_requestUri:protected] => /www/html/web/
[_baseUrl:protected] =>
[_basePath:protected] =>
[_pathInfo:protected] => /www/html/web/
[_params:protected] => Array (
[controller] => www
[action] => html
[module] => default
)
[_aliases:protected] => Array ( )
[_dispatched:protected] => 1
[_module:protected] => default
[_moduleKey:protected] => module
[_controller:protected] => www
[_controllerKey:protected] => controller
[_action:protected] => html
[_actionKey:protected] => action
)
[1] => Zend_Controller_Response_Http Object (
[_body:protected] => Array ( )
[_exceptions:protected] => Array RECURSION
[_headers:protected] => Array ( )
[_headersRaw:protected] => Array ( )
[_httpResponseCode:protected] => 200
[_isRedirect:protected] =>
[_renderExceptions:protected] =>
[headersSentThrowsException] => 1
)
)
)
[1] => Array (
[file] => C:\xampp\htdocs\www\html\index.php
[line] => 5
[function] => dispatch
[class] => Zend_Controller_Front
[type] => ->
[args] => Array ( )
)
)
[previous:Exception:private] =>
)
)
你们能帮我解决这个错误吗?提前感谢在该文件末尾添加以下行
主机ip
本地站点url
比如说
127.192.220.12
zend.local
我不知道这是最终的解决方案,但它可能会帮助你 如果您从windows迁移到linux系统,单词的大小写可能是一个问题。确保调用控制器时使用定义的相同大小写。是否检查了php错误日志。这可能更有用。@riggsfully异常说明了错误日志在这种情况下所说的内容。这是从windows到windows,只是从以前的开发人员到我。我需要在本地运行它才能对文件进行更改。您是否对此文件进行了任何更改windows/system32/drivers/etc/hostsIt不起作用。我刚刚知道这个系统是在linux下开发的。我想将它迁移到windows。我需要做哪些更改?或者,您可以在application.ini文件的[production]部分写下以下行:resources.frontController.params.useDefaultControllerAlways=1它不会更改任何内容。我读到这个错误是由于文件夹中不存在控制器引起的。我接受了这个文件,没有对控制器部分做任何更改。如果它在linux服务器上实时工作,我不知道为什么它不能在windows localhost上工作。那就回到互联网上来吧。。