时间问题(一) 比如传递过来时间 改成 传过来的那年那月的1号 例如 :2017-08-18 改为2017-08-01 查当前时间的前第七天 $date = date('Y-m-d', strtotime('-7 days'));