0
之前,我想这样做在那里:我看一看是时间
$time = time();
//Store the time in the dabase
//Some time later, say three hours this code runs
// so if your time() was 2pm its now 5pm when this statement
// is run.
if($time < 4 hours){
// do something.
}
但不知道该怎么做最彻底的方法是。
距离4小时之内?距罗马帝国沦陷4个小时?凌晨4点之前?你的问题需要更多的上下文。 – Jeremy1026
首先你需要赋予'hours'的价值,如'$ hours =“”; – samayo
我认为他的意思是现在4小时前 – poldixd