秀小川

秀小川

这家伙有点懒,还没写个性签名!

  • 财富值455
  • 威望值0
  • 总积分655

个人信息

  • 2017-12-29 已签到
    连续签到7天,获得了20个金钱
  • <?php
    
    $params = require(__DIR__ . '/params.php');
    $db = require(__DIR__ . '/db.php');
    
    $config = [
        'id' => 'basic',
        'basePath' => dirname(__DIR__),
        'bootstrap' => ['log'],
        'language' => 'zh-CN',
        'components' => [
            'assetManager' => [
                'assetMap' => [
                   // 'jquery.js' => '@web/js/jquery-1.11.1.min.js',
                ],
    //            'bundles' => [
    //                'yii\web\JqueryAsset' => [
    //                    'sourcePath' => null,
    //                    'js' => []
    //                ],
    //            ],
            ],
            'authManager' => [
                'class' => 'yii\rbac\DbManager',
            ],
            'formatter' => [
                'class' => 'yii\i18n\Formatter',
                'nullDisplay' => '',
    
            ],
            'request' => [
                // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
                'cookieValidationKey' => 'IdMsnYBmQFgfd9fz4m3vh_BOx61mfPWUZ',
                'enableCookieValidation' => false,
            ],
            'cache' => [
                'class' => 'yii\caching\FileCache',
            ],
    
            'user' => [
                'identityClass' => 'app\models\Operator',
                'enableAutoLogin' => false,
            ],
            'errorHandler' => [
                'errorAction' => 'site/error',
            ],
            'mailer' => [
                'class' => 'yii\swiftmailer\Mailer',
                // send all mails to a file by default. You have to set
                // 'useFileTransport' to false and configure a transport
                // for the mailer to send real emails.
                'useFileTransport' => true,
            ],
            'log' => [
                'traceLevel' => YII_DEBUG ? 3 : 0,
                'targets' => [
                    [
                        'class' => 'yii\log\FileTarget',
                        'levels' => ['info'],//这里说明配置的是那个,如error,warning,info,trace这些
                        'categories' => ['info'],//这里说明的保存的文件名
                        'logFile' => '@app/runtime/logs/info.log',//这里说明的保存的文件名的路径
                        'maxFileSize' => 1024 * 2,//这些一看就知道的就不说明了
                        'maxLogFiles' => 20,
                    ],
                    [
                        'class' => 'yii\log\FileTarget',
                        'levels' => ['error', 'warning', 'info'],
                    ],
    
                ],
            ],
            'db' => $db['db1'],
    
    
            'urlManager' => [
                'enablePrettyUrl' => true,
                'enableStrictParsing' => false,  //不启用严格解析
                'showScriptName' => false, //隐藏index.php
            	'suffix'=>'.jsp',
                'rules' => [
    //                '<module:\w+>/<controller:\w+>/<id:\d+>' => '<module>/<controller>/view',
    //                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                  	'<controller:(post|comment)>s'=>'<controller>/index',
                	'<controller:\w+>/<id:\d+>'=>'<controller>/view',
                	'<controller:\w+>/<id:\d+>/<action:(create|update|delete)>'=>'<controller>/<action>',
                ],
            ],
    
        ],
        'params' => $params,
    ];
    
    if (YII_ENV_DEV) {
        // configuration adjustments for 'dev' environment
    //    $config['bootstrap'][] = 'debug';
    //    $config['modules']['debug'] = [
    //        'class' => 'yii\debug\Module',
    //        // uncomment the following to add your IP if you are not connecting from localhost.
    //        'allowedIPs' => ['127.0.0.1', '::1'],
    //    ];
    
        $config['bootstrap'][] = 'gii';
        $config['modules']['gii'] = [
            'class' => 'yii\gii\Module',
            // uncomment the following to add your IP if you are not connecting from localhost.
            //'allowedIPs' => ['127.0.0.1', '::1'],
        ];
    }
    
    return $config;
    
    

    这是我的配置文件

  • 提出了问题
    Yii2 取oracle时间, 格式如何转换?
  • 2017-12-28 已签到
    连续签到6天,获得了20个金钱
  • 2017-12-27 已签到
    连续签到5天,获得了20个金钱
  • 回复了 的回答

    把设置中的'enableAutoLogin' => true去掉即可

            'enableAutoLogin' => false,我都配置成false了
    
  • 2017-12-26 已签到
    连续签到4天,获得了20个金钱
  • 2017-12-25 已签到
    连续签到3天,获得了15个金钱
  • 2017-12-24 已签到
    连续签到2天,获得了10个金钱
  • 2017-12-23 已签到
    连续签到1天,获得了5个金钱
主管 等级规则
655/1000
资料完整度
10/100
用户活跃度
0/100

Ta的关注

1

Ta的粉丝

1

Ta的访客

5