2013-05-12 74 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"); 

也確保您的文件/目錄名稱是正確的。

相關問題