正在显示
1 个修改的文件
包含
10 行增加
和
5 行删除
@@ -27,11 +27,16 @@ class AdminStatisticsController extends AdminBaseController{ | @@ -27,11 +27,16 @@ class AdminStatisticsController extends AdminBaseController{ | ||
27 | 27 | ||
28 | public function index(){ | 28 | public function index(){ |
29 | 29 | ||
30 | - $week1 = strtotime(date('Ymd',strtotime('-0 week')));//把周日当做是一个礼拜的开始,如果想把周一当做是一个礼拜的开始,就把Sunday换成Mondy | ||
31 | - echo date('Y-m-d H:i:s',$week1)."</br>"; | ||
32 | - | ||
33 | - $week = strtotime(date('Ymd',strtotime('-1 week'))); | ||
34 | - echo date('Y-m-d H:i:s',$week); | 30 | + $week0 = strtotime(date('Ymd',strtotime('-0 week')));//把周日当做是一个礼拜的开始,如果想把周一当做是一个礼拜的开始,就把Sunday换成Mondy |
31 | + echo date('Y-m-d H:i:s',$week0)."</br>"; | ||
32 | + | ||
33 | + $week1 = strtotime(date('Ymd',strtotime('-1 week'))); | ||
34 | + echo date('Y-m-d H:i:s',$week1); | ||
35 | + $week=array(); | ||
36 | + for ($i = 0; $i < 30; $i++){ | ||
37 | + $week[30-$i]=strtotime(date('Ymd',strtotime("-$i week"))); | ||
38 | + } | ||
39 | + dump($week); | ||
35 | 40 | ||
36 | return $this->fetch(); | 41 | return $this->fetch(); |
37 | } | 42 | } |
-
请 注册 或 登录 后发表评论