IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    YII2开启debug调试控制台

    二愣子小强发表于 2016-01-11 02:39:58
    love 0

    advanced/frontend/config/main-local.php配置内容

    <?php

    $config = [
        'components' => [
            'request' => [
                // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
                'cookieValidationKey' => 'C9msZAcL52z2HWnBHF2xumMH3GtTiVZ6',
            ],
        ],
    ];

    if (!YII_ENV_TEST) {
        // configuration adjustments for 'dev' environment
        $config['bootstrap'][] = 'debug';
        $config['modules']['debug'] = [
            'class' => 'yii\debug\Module',
            'allowedIPs' => [ '*']
        ];

        $config['bootstrap'][] = 'gii';
        $config['modules']['gii'] = [
            'class' => 'yii\gii\Module',
        ];
    }

    return $config;

    yii2_debug


    本文固定链接:成事博客→YII2开启debug调试控制台


沪ICP备19023445号-2号
友情链接