php – 在Zend Framework 1.10中加载“自定义资源”

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php – 在Zend Framework 1.10中加载“自定义资源”脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
一切都在1.9.6正常工作.我改为1.10,现在基本上每个应用程序资都有很多警告.

看起来ZF正在我设置的“自定义资源”路径中寻找应用程序资源:pluginpaths.App_Application_Resource =“App / Application / Resource.
有什么方法可以避免这种情况!? (提前感谢你的时间)

application.ini:

resources.locale.default = sq_AL
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.frontController.throwExceptions = 0

; VIEW & HTML Markup Options
resources.view.doctyPE = "HTML5"
resources.view.language = "en"
resources.view.setSeparator=" - "
resources.view.helperPath.View_Helper = APPLICATION_PATH "/views/helpers"
resources.view[] = 

; custom resources
**pluginpaths.App_Application_Resource = "App/Application/Resource"**

在库/ App / Application / Resource / Cache我有一个类“App_Application_Resource_Cache扩展Zend_Application_Resource_ResourceAbstract”,我需要缓存.
问题是,现在在第一页我有很多警告,如:

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/PHP/App/Application/Resource/Locale.PHP) is not wIThin the Allowed path(s): (/VAR/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP  on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/PHP/modules/App/Application/Resource/Locale.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/PHP/App/Application/Resource/Frontcontroller.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/PHP/modules/App/Application/Resource/Frontcontroller.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/PHP/App/Application/Resource/Layout.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/PHP/modules/App/Application/Resource/Layout.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/PHP/./views/helpers/Doctype.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/PHP/modules/./views/helpers/Doctype.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/PHP/./views/helpers/HeadMeta.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/PHP/modules/./views/helpers/HeadMeta.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/PHP/./views/helpers/HeadTitle.PHP) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.PHP on line 190

万一有人需要它,在引导程序中这是Autoload-er

<?PHP

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
 PRotected function _initAutoload()
    {
  $autoloader = new Zend_Application_Module_Autoloader(
   array(
          'namespace' => 'App','basePath' => dirname(__FILE__),)
     );
     return $autoloader;
    }

解决方法

好吧,这个问题已在评论中排序:)将此问题作为答案,您可以接受以结束问题.

您不能从PHP脚本访问该路径,请查看错误消息(/usr/share不在允许的目录列表中).将包含路径更改为(我猜)/ var / home / library / Zend /应该解决它.

我认为这取决于open_basedir设置,该设置禁止虚拟主机访问它们之外的任何内容,它不是特定于操作系统的.无论如何,很高兴它排序了!

脚本宝典总结

以上是脚本宝典为你收集整理的php – 在Zend Framework 1.10中加载“自定义资源”全部内容,希望文章能够帮你解决php – 在Zend Framework 1.10中加载“自定义资源”所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。