yii框架开启debug和gii
2016-03-31 16:55
417 查看
其实很简单,就是修改config文件夹下的web.php文件,添加红色的2行,我开始将allowedIPs写出allowIPs,一定要注意。其实可以直接查看\vendor\yiisoft\yii2-gii目录下的module类。
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'allowedIPs' => ['*.*.*.*','127.0.0.1', '::1'],
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'allowedIPs' => ['*.*.*.*','127.0.0.1', '::1'],
];
}
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'allowedIPs' => ['*.*.*.*','127.0.0.1', '::1'],
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'allowedIPs' => ['*.*.*.*','127.0.0.1', '::1'],
];
}
相关文章推荐
- matplotlib-绘制精美的图表
- php 获取今日、昨日、上周、本月的起始时间戳和结束时间戳的方法
- yii报错400
- sphinx使用步骤
- php中常用的运算符
- php programmer should know?
- update the gedit for php programming(searched not try yet)
- 127报错解决方法
- PHP缓存Xcache安装
- laravel多环境配置(local,testing,production)
- thinphp下拉获取更多瀑布流效果
- php中奖概率算法,可用于刮刮卡,大转盘等抽奖算法
- phpcms二次开发_创建功能模块
- php mvc 框架演示
- php mvc 框架演示
- php mvc 框架演示
- phpcms文件目录结构
- PHP操作FTP类 (上传、下载、移动、创建等)
- php获取本机真实IP地址实例代码
- laravel中的Contracts, ServiceContainer, ServiceProvider, Facades关系