我注意到,其中一個PHP腳本安裝的目錄有非常大的error_log文件幾乎1GB的大小,主要是錯誤生成的第478和479行編碼..例如,從error_log中文件中錯誤的是如下:PHP警告:filemtime()[<a href='function.filemtime'>function.filemtime</a>]
PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /home/khan/public_html/folder/ZBall.jar in /home/khan/public_html/folder/index.php on line 478
PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /home/khan/public_html/folder/ZBall.jar in /home/khan/public_html/folder/index.php on line 479
我有以下的編碼,線477至484
foreach ($mp3s as $gftkey => $gftrow) {
$ftimes[$gftkey] = array(filemtime($thecurrentdir.$gftrow),$gftrow);
$ftimes2[$gftkey] = filemtime($thecurrentdir.$gftrow);
}
array_multisort($ftimes2,SORT_DESC,$ftimes);
foreach ($ftimes as $readd) {
$newmp3s[] = $readd[1];
}
請幫我在這。
謝謝.. :)
以及該文件確實是存在的,文件得到下載,沒有問題在前端..問題是error_log文件被生成,並且隨着文件被大量下載文件的大小越來越大..已應用@Gabriel Sosa編輯的代碼..希望它能工作.. :-) – 2011-12-30 19:54:22
應用@Gab後riel Sosa的以下錯誤會生成...
'PHP Warning:array_multisort()[function.array-multisort]:參數#1預計是/home/khan/public_html/folder/index.php上的數組或排序標誌483 PHP警告:無效的參數爲foreach()提供的/home/khan/public_html/folder/index.php第484行#
來自第483-486行的代碼
'array_multisort($ ftimes2,SORT_DESC,$ ftimes); foreach($ ftimes as $ readd){$ newmp3s [] = $ readd [1]; }'
任何形式的幫助,將不勝感激..謝謝.. – 2011-12-30 20:24:18
@HaroonKhattak你的問題不是你有一個越來越多的錯誤日誌,這是你的代碼產生的錯誤。有些東西阻止了Apache/PHP能夠對該文件進行統計。 – 2011-12-30 20:24:31