2013-05-12 77 views
-2

错误:PHP include目录错误缓存我的远程服务器上

"Warning: include_once(../_includes/check_login_status.php) [function.include-once]: failed to open stream: No such file or directory in /home/content/60/10824160/html/index.php on line 1" 

嗨,我试图让固定这些目录的错误。基本上,我把整个网站文件夹移动到不同的计算机上,现在我的php包含函数试图找到"/home/content/60/10824160/html/index.php",这在这台计算机上不存在。

index.phpDesktop/www/和我check_login_statusDesktop/www/_includes/

我尝试使用PHP缓存功能,但不明白。我需要做什么?

+0

如果路径不存在,为什么你在那里看? – Bart 2013-05-12 21:55:43

+0

哪条路?对不起,我是一个初学者 – ryank 2013-05-12 22:01:14

+0

为什么代码在'/ home/**'中位于'〜/ Desktop/www'中时会显示?我的猜测是路径在你的php文件中被硬编码。 – Bart 2013-05-12 22:16:21

回答

0

删除或更正您的include_once - 这是唯一的解决方案。

0

试试这个

include_once($_SERVER["DOCUMENT_ROOT"]."/_includes/check_login_status.php"); 

也确保您的文件/目录名称是正确的。

相关问题