サイトマップのすべてのhtmlファイルの最終変更時刻をチェックするWebページから直接正常に実行されるphpスクリプトがありますが、エラーが発生した場合はcronジョブとして実行します。
以下は、スクリプト、cronジョブ、およびエラーです。
$path = "/home/mydir/";
// Open the folder
$dir_handle = @opendir($path) or die("Unable to open $path");
// Loop through the files
while ($file = readdir($dir_handle)) {
if($file == "." || $file == ".." || $file == "index.php" )
continue;
if(strpos($file, ".html") !== false) {
$a=filemtime($file);
}
}
}
php /home/mydir/pdate.php / dev / null && echo"サイトマップが完了しました"$(date)>> / var / log / cron.log
エラーPHP警告:filemtime():統計に失敗しました
これのために私が何を変えるべきかについてのアイデアはありますか?