我一直在就当地东道方(SOS:Snow Leopard)开展一个冷静的框架项目,当我把文件上载到主机(共用主机)时,我就使用该台的电击机提出一些错误。
More specifically:
The project structure is like this: ( i ommited some irrelevant subfolders and the numbers in the paranthesis is just for reference in here, it is not included in the folder name in the project)
application
-configs
-controllers
-layouts
--scripts
-models
-modules
--admin
---controllers
---models
---views(2)
----filters
----helpers(2)
----scripts
-views(1)
--helpers(1)
--scripts
library
public
在助手中(1) 具有观望助手,BasURL.php:
class Zend_View_Helper_BaseURL
{
function baseURL()
{
$fc = Zend_Controller_Front::getInstance();
return $fc->getBaseUrl();
}
}
例如,在布局中,我用它来书写像CSS档案、JS文件这样的 st路。
<script src="<?php echo $this->baseURL();?>/public/js/somejavascript.js></script>
And usually i use it when i need the base url (not only in layouts,also in views). I have been using the same helper in the default module of the application and in the admin module (modules/admin/...). Localy, everything went ok, no issues. When i uploaded the project, i got errors like:
An error occurred
Application error
Exception information:
Message: Plugin by name BaseURL was not found in the registry; used paths: Cmsadmin_View_Helper_: /path_to_site_like_public_html/application/modules/cmsadmin/views/helpers/ Zend_View_Helper_: Zend/View/Helper/
以上错误是行政布局(行政模块中称)使用提款权加权法的线路。
At first i thought maybe because the helper is declared in another module (the default module), its not found by the framework in the admin module. But why locally everything works ? I dont get it. Also, if i change $this->baseURL() to $this->baseUrl() in the same admin.phtml layout file, in the admin module, everything works (online and locally).
如果有人能向我介绍一下哪怕是失踪了,那么我会不胜感激。
P.S.:由于我的头目尚不明确,也许有人可以告诉我: a 可在网站的所有模块中公布单元中的助手? (地方发展告诉我,自当地工作以来,当地情况是,上载项目有什么错误?)
感谢。