作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

order

@@ -27,15 +27,12 @@ class AdminStatisticsController extends AdminBaseController{ @@ -27,15 +27,12 @@ class AdminStatisticsController extends AdminBaseController{
27 27
28 public function index(){ 28 public function index(){
29 29
30 - $week0 = strtotime(date('Ymd',strtotime('-0 week')));//把周日当做是一个礼拜的开始,如果想把周一当做是一个礼拜的开始,就把Sunday换成Mondy  
31 - echo $week0."</br>";  
32 -  
33 - $week1 = strtotime(date('Ymd',strtotime('-1 week')));  
34 - echo date('Y-m-d H:i:s',$week1);  
35 $week=array(); 30 $week=array();
36 for ($i = 0; $i <= 30; $i++){ 31 for ($i = 0; $i <= 30; $i++){
37 - $week[30-$i]=strtotime(date('Ymd',strtotime("-$i week"))); 32 + $week[30-$i]=strtotime(date('Ymd',strtotime("-$i day")));
38 } 33 }
  34 +
  35 +
39 dump($week); 36 dump($week);
40 37
41 return $this->fetch(); 38 return $this->fetch();