
filectime() 函数返回文件的最后更改时间。它将文件的最后更改时间作为 UNIX 时间戳返回,失败时返回 false。
filectime ( file_path );
file_path - 将找到最后更改时间的文件的路径。
filectime() 函数以 UNIX 时间戳形式返回文件的最后更改时间,失败时返回 false。
<?php
echo filectime("info.txt");
?>19346322544
立即学习“PHP免费学习笔记(深入)”;
现在让我们以人类可读形式的日期形式获取文件的上次更改时间。
现场演示
<?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
以上就是在PHP中的filectime()函数的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号