【发布时间】:2013-01-20 16:56:39
【问题描述】:
您好,我创建了多个 php 页面,这些页面正在使用 require_once 或 include 函数调用其他页面。当我运行主脚本时,它显示以下错误:
警告:include() [function.include]:http:// 包装器在服务器配置中被 /home/content/13/10377813/html/components/com_jumi/views/application/view 中的 allow_url_include=0 禁用.html.php(38) : eval()'d 代码在第 13 行
警告:包含(http://bphf2012.org/index.php?option=com_jumi&fileid=10)[function.include]:无法打开流:在 /home/content/13/10377813/html/components/com_jumi/views/application/view 中找不到合适的包装器。 html.php(38) : eval()'d 代码在第 13 行
警告:include() [function.include]:无法在 /home/content/13/10377813 中打开 'http://bphf2012.org/index.php?option=com_jumi&fileid=10' 以包含 (include_path='.:/usr/local/php5_3/lib/php') /html/components/com_jumi/views/application/view.html.php(38) : 第 13 行的 eval() 代码
谁能帮我解决这个问题...
谢谢。
好的,更改服务器配置后错误已得到修复,但我现在面临另一个问题。当我运行脚本时,它显示一个空白页。我想我在我的剧本上犯了一些错误。您能否检查一下我的 php 脚本,您可以从以下链接中找到:
https://www.dropbox.com/sh/vof0p4heo4csdn9/dj2NfgcWuE
我所做的是,我复制了脚本并粘贴在同名的 jumi 组件上。之后,我在菜单管理器上分配了链接以运行。
如果您想查看它的显示方式,请访问我的网站:
http://bphf2012.org/index.php?option=com_jumi&view=application&fileid=3&Itemid=103
请帮帮我...
谢谢。
【问题讨论】:
-
您可能还想为 php 打开“display_errors”或检查 php 错误日志,因为我猜 php 仍然在注册的第 16 行的 require_once 语句周围抛出错误.php。这看起来像是文档停止渲染的地方。
-
我很抱歉,但是我怎样才能打开 display_errors...其实我是一个初学者 php 和 joomla 用户...谢谢。
-
对于您的情况,我将首先尝试在运行时更改它。您可以使用 php 函数顶部的函数,如 here 所述
-
错误显示:警告:require_once(bphf2012.org/index.php?option=com_jumi&fileid=10)[function.require-once]:无法打开流:/home/content/13/10377813/html 中没有这样的文件或目录/components/com_jumi/views/application/view.html.php(40) : eval()'d code on line 21 致命错误: require_once() [function.require]: 无法打开需要'bphf2012.org/index.php?option=com_jumi&fileid=10' (include_path= '.:/usr/local/php5_3/lib/php') 在 /home/content/13/10377813/html/components/com_jumi/views/application/view.html.php(40) : eval()'d 代码在第 21 行
-
您在包含语句中使用 URL 和 URL 变量(例如
bphf2012.org/index.php?option=com_jumi&fileid=10)。包含在 php 中的正确方法是提供文件的基于系统的路径。例如,require_once("/home/content/13/10377813/html/THE/REST/OF/THE/PATH_TO_YOUR_FILE")。更好的写法是:require_once($_SERVER["DOCUMENT_ROOT"]."/THE/REST/OF/THE/PATH_TO_YOUR_FILE").
标签: php joomla2.5 require-once jumi