更新时间:2023-01-29 19:14:22
从 php第条:
<?php
// outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23.
$filename = 'somefile.txt';
if (file_exists($filename)) {
echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename));
}
?>
filemtime()但我不确定是否可以获得远程文件的最后修改日期,因为服务器应该将其发送给您...也许在HTTP头中?
filemtime() is the key here. But I'm not sure if you can get the last modified date of a remote file, since the server should send it to you... Maybe in the HTTP headers?