yii2使用gii

1、设置web/index.php文件

defined('YII_ENV_DEV') or define('YII_ENV_DEV', true);

才能访问gii

2、advanced版本修改config/main.php,basic版本是web.php

'modules' => [
        'gii' => [
            'class'      => 'yii\gii\Module',
            'allowedIPs' => ['*', '127.0.0.1', '::1', '192.168.0.*', '192.168.178.20']
        ]
    ],

3、访问yousite/index.php?r=gii

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>