int fileatime ( string $filename );
它获取给定文件的最后访问时间。
参数 filename - 文件的路径。
链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-fileatime.html
来源:LearnFk无涯教程网
它返回上次访问文件的时间,如果出现错误,则返回False。时间以Unix时间戳的形式返回。
<?php $filename="/home/httpd/html/index.php"; if (file_exists($filename)) { echo "$filename was last accessed: " . date("F d Y H:i:s.", fileatime($filename)); } ?>
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)