PHP filemtime() Fungsi
Referensi Sistem File PHPContoh
Dapatkan terakhir kali konten file diubah:
<?php
echo filemtime("webdictionary.txt");
echo "<br>";
echo "Content last changed: ".date("F d Y H:i:s.", filemtime("webdictionary.txt"));
?>
Definisi dan Penggunaan
Fungsi filemtime() mengembalikan terakhir kali konten file diubah.
Catatan: Hasil dari fungsi ini di-cache. Gunakan clearstatcache() untuk menghapus cache.
Sintaksis
filemtime(filename)
Nilai Parameter
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Detail Teknis
Nilai Kembali: | Terakhir kali konten file diubah sebagai stempel waktu Unix, SALAH saat gagal |
---|---|
Versi PHP: | 4.0+ |
Referensi Sistem File PHP