我是PHP新手,正在编写一个包含a module which reads the file timestamp out of a file and then compare with system time to see whether the file is older than 5 minutes or not and I am wondering how that can be achieved
的PHP脚本。我目前使用PHP:比较文件时间戳与系统时间
$timeStamp = strftime('%c', filectime($this->localPath));
$timeStamp2 = filectime($this->localPath);
两个$timeStamp
和$timeStamp2
是不同的,第一个是更可读
$timeStamp Mon Jun 20 15:17:01 2011
$timeStamp2 1308608221
是什么$timeStamp2
意思?
再次,如何看是否the file is more than 5 minutes old?
谢谢。我只是想到了这一点。哈哈 –
很高兴知道。当你有机会时不要忘记标记这个答案为接受:) – anubhava