MainController.php 374 B

1234567891011121314151617181920
  1. <?php
  2. namespace mobile\controllers;
  3. use common\components\token;
  4. use Yii;
  5. use yii\web\Controller;
  6. class MainController extends PublicController{
  7. public $enableCsrfValidation = false;
  8. public function actionIndex()
  9. {
  10. echo 'abc';
  11. echo token::create(1152);die;
  12. $host = Yii::$app->request->getHostInfo();
  13. return $this->renderPartial('index',['host'=>$host]);
  14. }
  15. }