<?php
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', 'On'); //是否显示报错信息
ini_set("session.cookie_httponly", 1); //开启Cookie的HttpOnly属性
ini_set('date.timezone', 'Asia/shanghai'); //时区设置

header('X-Frame-Options: SAMEORIGIN');
header("content-type: text/html; charset=utf-8");

define('WEBROOT', dirname(__FILE__));

// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');

$config = require(__DIR__ . '/config/web.php');

$app = new yii\web\Application($config);
$app->run();

?>