<?php
namespace app\controllers;

use Yii;
use yii\web\Controller;

class TimeController extends Controller
{
	private $request; //Yii::$app->request对象
	
	public function init(){
		$this->request = Yii::$app->request;
	}
	
	public function beforeAction($action) {
		return true;
	}

	//系统时间
	public function actionIndex(){
		echo date("Y-m-d H:i:s");
	}
	
}
?>