Press "Enter" to skip to content

Get file last modified timestamp

Retrieving last modified timestamp for a file

[code]
< ?php //set path/filename or passed from form argument $filename = '/path/filename.dat'; // checks that the file actually exists and queries the last modified timestamp if (file_exists($filename)) { echo "$filename exists"; echo " last timestamp: " . date("d-m-y", filemtime($filename)); } else { echo "$filename does not exist"; } ?>
[/code]