68 lines
2.1 KiB
PHP
Executable File
68 lines
2.1 KiB
PHP
Executable File
<?php
|
||
# @Author: 嗨噜客科技(www.hiluker.cn) <Fm453>
|
||
# @Date: 1970-01-01T08:00:00+08:00
|
||
# @Email: fm453@hiluker.com
|
||
# @Last modified by: fm453
|
||
# @Last modified time: 2021-09-16T06:55:55+08:00
|
||
|
||
$params = array_merge(
|
||
require(__DIR__ . '/../../common/config/params.php'),
|
||
require(__DIR__ . '/params.php')
|
||
);
|
||
|
||
$config = [
|
||
'id' => 'app-frontend',
|
||
'basePath' => dirname(__DIR__),
|
||
'bootstrap' => ['log'],
|
||
'controllerNamespace' => 'frontend\controllers',
|
||
'defaultRoute' => 'site', //默认路由控制器
|
||
'modules' =>[],
|
||
'layout' => 'empty',//布局文件 优先级: 控制器>配置文件>系统默认
|
||
'language'=>'zh-CN',
|
||
'components' => [
|
||
'request' => [
|
||
'csrfParam' => '_csrf-frontend',
|
||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||
'cookieValidationKey' => '9F7706851F99630BA8FA23E2E897226E',
|
||
'parsers' => [
|
||
'application/json' => 'yii\web\JsonParser',
|
||
]
|
||
],
|
||
'user' => [
|
||
'identityClass' => 'common\models\Member',
|
||
'enableAutoLogin' => true,
|
||
'identityCookie' => ['name' => '_identity-frontend', 'httpOnly' => true],
|
||
],
|
||
'session' => [
|
||
// this is the name of the session cookie used for login on the frontend
|
||
'name' => 'advanced-frontend',
|
||
],
|
||
'log' => [
|
||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||
'targets' => [
|
||
[
|
||
'class' => 'yii\log\FileTarget',
|
||
'levels' => ['error', 'warning'],
|
||
],
|
||
],
|
||
],
|
||
'errorHandler' => [
|
||
'errorAction' => 'site/error',
|
||
],
|
||
'assetManager' => [
|
||
'basePath' => __DIR__ . '/../web/assets',
|
||
],
|
||
'urlManager' => [
|
||
'enablePrettyUrl' => true,
|
||
'enableStrictParsing' => false,
|
||
'showScriptName' => true, //建议TRUE,减少出现路径错误
|
||
'suffix' => '.hi',
|
||
'rules' => [
|
||
],
|
||
],
|
||
],
|
||
'params' => $params,
|
||
];
|
||
|
||
return $config;
|