標題:

aa.jpg

 

此文章來自奇摩知識+如有不便請留言告知

php主機問題

發問:

請問出現Warning: Invalid argument supplied for foreach() in /home/todoutw/public_html/modules/article/newchapter.php on line 63Warning: file_get_contents(/home/todoutw/public_html/files/article/txt/0/402/236578.txt) [function.file-get-contents]: failed to open stream: No such file or directory in... 顯示更多 請問出現 Warning: Invalid argument supplied for foreach() in /home/todoutw/public_html/modules/article/newchapter.php on line 63 Warning: file_get_contents(/home/todoutw/public_html/files/article/txt/0/402/236578.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/todoutw/public_html/global.php on line 611 這個是啥原因要怎解決 這是我轉移主機以後才發現的 真的不知道那裡有問題

最佳解答:

第一個問題他是說 foreach()方法中有無效的"引數" 所以你要去查/home/todoutw/public_html/modules/article/newchapter.php 這支php的第63行的foreach迴圈的寫法是不是出問題了! 或是傳入的引數來源出了問題 第二個警告訊息是開啟檔案失敗,可能是找不到檔案,簡單來說你這個file_get_contents()方法告訴你找不到檔案或是檔案有問題 去檢查一下/home/todoutw/public_html/global.php這支php的第611行看一下file_get_contents()裡面傳入的/home/todoutw/public_html/files/article/txt/0/402/236578.txt 這個檔案在不在吧!還有一個錯誤就是file_get_contents()這個方法收的是字串所以你字串前後要加上雙引號「"」這玩頁! 檢查一下吧

其他解答:

http://fantasizedream.net/blog/dathgod/?p=238081B933AEEFE995
arrow
arrow

    bgdwze3 發表在 痞客邦 留言(0) 人氣()