mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-17 16:01:15 +08:00

- Turned on CSRF validation by default. - Added access control for login, signup and logout for frontend application. - Added access control for login, logout and index for backend application. - YII_ENV is now defined for all applications. - No trace is writted to logs if debug is turned off. - Added default error view for frontend and backend. - In frontend application captcha will always ask for "testme" if YII_ENV is defined as "test".
15 lines
424 B
PHP
15 lines
424 B
PHP
<?php
|
|
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/Yii.php');
|
|
|
|
$config = yii\helpers\ArrayHelper::merge(
|
|
require(__DIR__ . '/../config/main.php'),
|
|
require(__DIR__ . '/../config/main-local.php')
|
|
);
|
|
|
|
$application = new yii\web\Application($config);
|
|
$application->run();
|