$time1=2011-11-11 11:11:11
$time2=2016-12-10 16:58:13
代码:
1 if(abs(strtotime($time2)-strtotime($time1)) > 24*3600){ 2 echo "时间不能超过一天"; 3 4 }
$time1=2011-11-11 11:11:11
$time2=2016-12-10 16:58:13
代码:
1 if(abs(strtotime($time2)-strtotime($time1)) > 24*3600){ 2 echo "时间不能超过一天"; 3 4 }