このコードを作成して、ファイルが最後にタッチされた日付を取得し、AM/PM形式でユーザーに表示します。
しかし、それは機能していないようです。私は近くにいることを知っています。私は何が間違っているのですか?
$filename = 'test.html';
if (file_exists($filename)) {
$date = date(filemtime($filename));
clearstatcache();
}
echo "- last updated: " . date('F d Y h:i A', strtotime($date));
出力:最終更新日:1969年12月31日06:59 PM