php获取本周时间方法 2021-01-06 编程 123456// 获取本周时间$nowDate = date('Y-m-d');$week = date('w', strtotime($nowDate));$start_time = strtotime("$nowDate - " . ($week ? $week - 1 : 6).' days');// 本月时间$start_time = date('Y-m-01');