0

在 localhost 中使用 Zend 框架项目很好,但是当我将它放在公共 Web 服务器中时,出现以下错误:

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'DocType' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/:../application/views/helpers/' in /path/to/my/appli/application/library/Zend/Loader/PluginLoader.php:412 
Stack trace: 
#0 /path/to/my/appli/application/library/Zend/View/Abstract.php(1182): Zend_Loader_PluginLoader->load('DocType') 
#1 /path/to/my/appli/application/library/Zend/View/Abstract.php(618): Zend_View_Abstract->_getPlugin('helper', 'docType') 
#2 /path/to/my/appli/application/library/Zend/View/Abstract.php(344): Zend_View_Abstract->getHelper('docType') 
#3 [internal function]: Zend_View_Abstract->__call('docType', Array) 
#4 /path/to/my/appli/appli in /path/to/my/appli/application/library/Zend/Loader/PluginLoader.php on line 412

感谢您的帮助

4

2 回答 2

1

doctype 区分大小写,你应该写 $view->doctype 而不是 $view->docType

于 2012-10-16T14:05:03.380 回答
0

问题解决了我刚刚从我的引导程序中删除了以下几行:

protected function _initDoctype() {
    $this->bootstrap('view');
    $view = $this->getResource('view');
    $view->docType('XHTML1_TRANSITIONAL');
}

而且我不知道为什么当我删除它时它可以正常工作:/(此功能在我的本地主机中没有问题,但在远程服务器中没有问题)

于 2012-05-23T17:11:01.660 回答