是否有可能获得文件被上传到FTP的日期?不是创建。
它的使用将在一个系统中,我上传文件供客户查看,该文件将出现在动态页面上,需要在最后一次更改它们时加上时间戳。
我基本上需要得到的时间,文件已经完成传输到FTP -通过一个FTP客户端,由我上传。
发布于 2011-05-16 04:41:56
使用PHP的stat()函数。它返回您需要知道的所有数据。
http://php.net/manual/en/function.stat.php
<?php
/* Get file stat */
$stat = stat('C:\php\php.exe');
/*
* Print file access time, this is the same
* as calling fileatime()
*/
echo 'Access time: ' . $stat['atime'];
/*
* Print file modification time, this is the
* same as calling filemtime()
*/
echo 'Modification time: ' . $stat['mtime'];
/* Print the device number */
echo 'Device number: ' . $stat['dev'];
?>我认为,在你的情况下,“文件修改时间”是答案。
https://stackoverflow.com/questions/6013209
复制相似问题