PHPfilemtime () function. Define and use the filemtime () function to return the last modification time of the file content. If successful, the time is returned in Unix timestamp format. If it fails, false is returned. Syntax: filemtim definition and usage
The filemtime () function returns the last modification time of the file content.
If successful, the time is returned in Unix timestamp format. If it fails, false is returned.
Syntax
Filemtime (filename)
Parameters
Description
Filename is required. Specifies the file to be checked.
Description
This function returns the time when the data block in the file was last written, that is, the time when the file content was last modified.
Tips and comments
Tip: the result of this function will be cached. Use clearstatcache () to clear the cache.
Example
Echo filemtime ("test.txt ");
Echo "Last modified:". date ("F d y h: I: s.", filemtime ("test.txt "));
?>
Output:
1139919766
Last modified: February 14 2006 13:22:46.
The latest filemtime () function returns the last modification time of the file content. If successful, the time is returned in Unix timestamp format. If it fails, false is returned. Syntax filemtim...