AdminStatisticsController.php
890 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Created by PhpStorm.
* User: ruidiudiu
* Date: 2018/11/21
* Time: 17:20
*/
namespace app\portal\controller;
use cmf\controller\AdminBaseController;
/**
* Class AdminStatisticsController
* @package app\portal\controller
* @adminMenuRoot(
* 'name' =>'数据统计',
* 'action' =>'index',
* 'parent' =>'',
* 'display'=> true,
* 'order' => 1,
* 'icon' =>'th',
* 'remark' =>'数据统计'
* )
*/
class AdminStatisticsController extends AdminBaseController{
public function index(){
$week1 = strtotime("Monday");//把周日当做是一个礼拜的开始,如果想把周一当做是一个礼拜的开始,就把Sunday换成Mondy
echo date('Y-m-d H:i:s',$week1);
$week = strtotime(date('Ymd',strtotime('-1 week')));
echo date('Y-m-d H:i:s',$week);
return $this->fetch();
}
}