1
如果时间戳超过20分钟,我试图删除$ lockfile。如果时间戳超过20分钟,则删除文件php
if (file_exists($lockfile) && time() - filemtime($lockfile) > strtotime("+20 minutes")) {
// If lockfile is alive for more than 20 minutes, unlink it
unlink($lockfile);
}
我想不通它为什么不起作用。可能现在我忽略了一些简单的东西。先谢谢你!