filectime()函数返回文件的最后更改时间。它以UNIX时间戳记返回文件的最后更改时间,并在失败时返回false。
filectime ( file_path );
file_path-将为其找到最后更改时间的文件的路径。
filectime()函数将文件的最后更改时间作为UNIX时间戳返回,并在失败时返回false。
<?php
echo filectime("info.txt");
?>输出结果
19346322544
现在让我们以人类可读的形式获取文件的最后更改时间作为日期。
<?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