The filemtime() function returns the last modification time of the file contents.
If successful, the function returns the last modification time of the file's contents as a Unix timestamp. If it fails, returns FALSE.
filemtime(filename)
parameter | describe |
---|---|
filename | Required. Specifies the documents to be checked. |
Note: The results of this function will be cached. Please use clearstatcache() to clear the cache.
<?phpecho filemtime("test.txt");echo "<br />";echo "Last modified: ".date("F d YH:i:s.",filemtime("test.txt")); ?>
The above code will output:
1139919766Last modified: February 14 2006 13:22:46.