yii2的应用配置文件路径 [英] application configuration file path of yii2

查看:34
本文介绍了yii2的应用配置文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 yii2,然后从 this 链接.

I installed yii2 and then added gii to yii2 from this link.

return [
'bootstrap' => ['gii'],
'modules' => [
    'gii' => 'yii\gii\Module',
    // ...
],
// ...

];

我想把这段代码放在应用程序配置文件它所在的位置?

I want to plce this code in application configuration file where it is located?

推荐答案

应用配置文件位于:project_name/config/web.php

Application configuration file reside in: project_name/config/web.php

if (YII_ENV_DEV) {
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
    'class'=>'yii\gii\Module',
    'allowedIPs'=>['127.0.0.1','192.168.1.*'],
];

这篇关于yii2的应用配置文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆