Current Location: Home> Function Categories> filemtime

filemtime

Get file modification time
Name:filemtime
Category:File system
Programming Language:php
One-line Description:Returns the last modified time of the file.

Definition and usage

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.

grammar

 filemtime ( filename )
parameter describe
filename Required. Specify documents to be inspected.

illustrate

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.

Similar Functions
Popular Articles