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