十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
今天:: $start_time = mktime(0,0,0,date('m'),date('d'),date('Y')); $end_time = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1; 明天: $start_time = mktime(0,0,0,date('m'),date('d'),date('Y'))+86400; $end_time = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1+86400; 本周: $start_time = mktime(0,0,0,date('m'),date('d')-date('w')+1,date('Y')); $end_time = mktime(23,59,59,date('m'),date('d')-date('w')+7,date('Y')); 本周末: $start_time = mktime(0,0,0,date('m'),date('d')-date('w')+6,date('Y')); $end_time = mktime(23,59,59,date('m'),date('d')-date('w')+7,date('Y')); 本月: $start_time = mktime(0,0,0,date('m'),1,date('Y')); $end_time = mktime(23,59,59,date('m'),date('t'),date('Y')); 一个月的开始和结束时间戳: $date = "2017-09"; $date_arr = explode('-',$date); $start_time = mktime(0,0,0,date($date_arr[1]),1,date($date_arr[0])); $end_time = mktime(23,59,59,date($date_arr[1]),date('t',$start_time),date($date_arr[0]));