方法1:
//当日0点的时间
$dateStr = date('Y-m-d', time());
$timestamp0 = strtotime($dateStr);
//当日24点的时间
$timestamp24 = strtotime($dateStr) + 86400;
方法2:
//获取当日零点的时间戳
$y = date("Y");
$m = date("m");
$d = date("d");
$morningTime= mktime(0,0,0,$m,$d,$y);
//获取当日24点的时间戳
$nightTime = $morningTime+86400;
//获取昨日凌晨的时间
$tomorrow = mktime(0,0,0,date("m"),date("d")-1,date("Y"));