Home > Article > Backend Development > When using Gii to generate code in Yii, I encounter 'Setting unknown property: yiiwebApplication::gii'
??
When using Gii to generate code in Yii, I encountered "Setting unknown property: yiiwebApplication::gii"
For the use of Gii: http://www.yiichina.com/doc/guide/2.0/ start-gii and https://github.com/yiisoft/yii2/blob/master/docs/guide/start-gii.md, I put the following paragraph directly in $config = [. . . 】; inside, and then encountered "Setting unknown property: yiiwebApplication::gii".
<span>'gii' => [ 'class' => 'yii\gii\Module', 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'] // adjust this to your needs ],</span>
Then I tried to put this code in "
$config['modules']['gii' ] = [
'class'=> <span>$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '10.231.113.187']
];</span>
So this document is still ambiguous.
The above introduces the "Setting unknown property: yiiwebApplication::gii" encountered when using Gii to generate code in Yii, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.