//当前时间戳
time()
//今天开始结束
date("Y-m-d",time())." 00:00:00"
date("Y-m-d",time())." 23:59:59"
//昨天开始结束
date("Y-m-d",strtotime("-1 day"))." 00:00:00"
date("Y-m-d",strtotime("-1 day"))." 23:59:59"
//近七天
$week = date("Y-m-d",strtotime("-6 day"))." 00:00:00"
$week = date("Y-m-d",strtotime("-0 day"))." 23:59:59"
网友评论