Home > Article > Backend Development > How to use filemtime function
php filemtime() function is used to obtain the file modification time.
php filemtime() function Syntax
Function: Return the last modification time of the file content.
Syntax:
filemtime(filename)
Parameters:
filename required. Specifies the documents to be checked.
Note: If successful, the time will be returned as a Unix timestamp. On failure, returns false.
php filemtime() function example
<?php $file = filemtime("./test.txt"); echo "文件上一次修改的时间为:".$file; ?>
This article is an introduction to the PHP filemtime function. I hope it will be helpful to friends in need!
The above is the detailed content of How to use filemtime function. For more information, please follow other related articles on the PHP Chinese website!