2024年06月05日 建站教程
php代码如何获取最后修改的时间,下面web建站小编给大家简单介绍一下filemtime和getlastmod的使用方法!
利用filemtime获取最后修改时间
header("Content-type:text/html;charset=utf-8");
$file = "aaa.txt";
echo "文件修改时间为:".filemtime($file);
利用getlastmod获取最后修改时间
$time = getlastmod();
echo date('Y-m-d H:i:s',$time);
本文链接:http://so.lmcjl.com/news/5999/