我已将一个相对简单的 ZF 应用程序从基于 Windows 的服务器移至 linux 服务器,并收到以下致命错误:
'Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'SiteDetail' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/:/home/yourfran/public_html/customcutout/application/views/helpers/' in /usr/etc/Zend/library/Zend/Loader/PluginLoader.php:412 Stack trace: #0 /usr/etc/Zend/library/Zend/View/Abstract.php(1182): Zend_Loader_PluginLoader->load('SiteDetail') #1 /usr/etc/Zend/library/Zend/View/Abstract.php(618): Zend_View_Abstract->_getPlugin('helper', 'siteDetail') #2 /usr/etc/Zend/library/Zend/View/Abstract.php(344): Zend_View_Abstract->getHelper('siteDetail') #3 /home/yourfran/public_html/customcutout/application/layouts/scripts/layout.phtml(28): Zend_View_Abstract->__call('siteDetail', Array) #4 /home/yourfran/public_html/customcutout/application/layouts/scripts/layout.phtml(28): Zend_View->siteDetail() #5 /usr/etc/Zend/library/Zend/View.php(108): include('/home/yourfran/...') #6 /usr/etc/Zend/library/Zend/View/Abstract.php(888): Zend_View->_run('/hom in /usr/etc/Zend/library/Zend/Controller/Plugin/Broker.php on line 336
我有一个名为 Sitedetail (不是 SiteDetail)的视图助手,但在我的代码中,我没有将它称为SiteDetail,只有小写的d
任何帮助表示赞赏。
更新:
第 28 行,layout.phtml
<h1><?php echo $this->escape($this->siteDetail()->title); ?></h1>
固定:[如何?像这样..]
在我看来助手(Sitedetail.php)我改变了
public function siteDetail()
到
public function Sitedetail()
然后在我的 layout.phtml
<h1><?php echo $this->escape($this->siteDetail()->title); ?></h1>
<p><?php echo $this->escape($this->siteDetail()->strapline); ?></p>
到
<h1><?php echo $this->escape($this->Sitedetail()->title); ?></h1>
<p><?php echo $this->escape($this->Sitedetail()->strapline); ?></p>