尝试进行简单的日期比较。 这两个日期的格式为“Y F jS,g:i a”。 例如 2018年9月3日上午9:30。 p>
$ today = date('YF jS,g:i a');
$ expire = file_get_contents(dirname(__ FILE__)) 。'/ maintenance / end_time.php');
if($ today> $ expire){
unlink(dirname(__ FILE __)。'/ maintenance / end_time.php');
}
code > pre>
我的代码无法正常工作。 我也试过strototime(),但那也不成功。 p>
div>