PHP filemtime() Function
Complete PHP Filesystem Reference Manual
Definition and Usage
The filemtime() function returns the time when the file contents were last modified.
Returns the last modification time of the file contents as a Unix timestamp on success, or FALSE on failure.
Syntax
filemtime(filename)
| Parameters | Description |
|---|---|
| filename | Required. Specifies the file to check. |
Tips and Notes
**Note:** The results of this function are cached. Use clearstatcache() to clear the cache.
Example
"; echo "Last modified: ".date("F d Y H:i:s.",filemtime("test.txt")); ?>The code above will output:
1139919766
Last modified: February 14 2006 13:22:46.
Complete PHP Filesystem Reference Manual