【发布时间】:2016-10-09 07:06:57
【问题描述】:
如果时间戳超过 20 分钟,我正在尝试删除 $lockfile。
if (file_exists($lockfile) && time() - filemtime($lockfile) > strtotime("+20 minutes")) {
// If lockfile is alive for more than 20 minutes, unlink it
unlink($lockfile);
}
我不知道为什么它不起作用。可能是我现在忽略的一些简单的事情。提前谢谢!
【问题讨论】:
标签: php strtotime file-exists filemtime