The filectime() function returns the last modification time of the file. It returns the last modified time of the file as a UNIX timestamp, or false on failure.
filectime ( file_path );
file_path - The path to the file whose last changed time will be found.
The filectime() function returns the last modified time of the file in the form of a UNIX timestamp, and returns false on failure.
<?php echo filectime("info.txt"); ?>
19346322544
Now let’s get the last changed time of the file as a date in human readable form.
Live demonstration
<?php echo "Last change time of the file: ".date("F d Y H:i:s.",filectime("info.txt")); ?>
Last change time of the file: September 23 2018 08:12:42
The above is the detailed content of filectime() function in PHP. For more information, please follow other related articles on the PHP Chinese website!