【发布时间】:2016-07-06 21:50:09
【问题描述】:
这是我第一次上传网站 - http://indianrestaurantmumbai.com/,我已将所有必要的内容添加到我的文件夹中(我认为),它给了我这个错误消息:
Warning: require_once(/home/ecoconst/public_html/IndianRestaurantMumbai.com/includes/defines.php): failed to open stream: No such file or directory in /home/ecoconst/public_html/IndianRestaurantMumbai.com/index.php on line 21
Fatal error: require_once(): Failed opening required '/home/ecoconst/public_html/IndianRestaurantMumbai.com/includes/defines.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ecoconst/public_html/IndianRestaurantMumbai.com/index.php on line 21
有人能帮帮我吗?
【问题讨论】:
-
这是因为您所包含的路径与您的文档结构的实际情况相比不正确。您可以尝试类似
require_once $_SERVER['DOCUMENT_ROOT']."/includes/defines.php";的方法,或者通过添加echo __FILE__;并访问该脚本来查找文档的真实路径 - 并使用该绝对路径。 -
我删除了“require_once (JPATH_BASE .DS.'includes'.DS.'defines.php');” “require_once (JPATH_BASE .DS.'includes'.DS.'framework.php');”它只留下“致命错误:在第 21 行的 /home/ecoconst/public_html”/IndianRestaurantMumbai.com/index.php 中的 null 上调用成员函数 mark()
-
@Qirel 它一定是我的配置中的东西。我只是不知道是什么。
-
你知道,没有看到你的代码,那些错误和你刚才解释的意义很小。这里没有人可以读心;-) 正如我所说,尝试在
$_SERVER['DOCUMENT_ROOT']的帮助下包含文件,如上所述。至于Call to a member function mark() on null,看不到代码的作用就忍不住了。 -
我找到了解决方案,只是 .htaccess 正在寻找第一页“index.html”,而我的 .html 文件是“Index.html”,大写“I”,还是谢谢你 :)
标签: php joomla cpanel require-once