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