filemtime
Get file modification time
filemtime()
function returns the last time the file content is modified.
If successful, the time is returned as a Unix timestamp. If it fails, return false.
<?php echo filemtime("test.txt"); echo "Last modified: ".date("F d Y H:i:s.",filemtime("test.txt")); ?>
输出:
1139919766 Last modified: February 14 2006 13:22:46.
filemtime ( filename )
parameter | describe |
---|---|
filename | Required. Specify documents to be inspected. |
This function returns the last time the data block in the file was written, that is, the last time the content of the file was modified.