草庐IT

PostQClose

全部标签

php if语句检查当前日期时间是否在2个日期时间列之间

PostQopen和PostQClose是日期时间列。我需要一个phpif语句来检查当前日期时间是否在PostQopen和PostQClose列之间。$now=date('Y-m-dH:i:s');if($rows['PostQopen']>='$now'&&$rows['PostQClose'] 最佳答案 使用DateTime.$now=newDateTime("now");$PostQopen=newDateTime($rows['PostQopen']);$PostQClose=newDateTime($rows['PostQ