Home > Backend Development > PHP Tutorial > When using Gii to generate code in Yii, I encounter 'Setting unknown property: yiiwebApplication::gii'

When using Gii to generate code in Yii, I encounter 'Setting unknown property: yiiwebApplication::gii'

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 08:56:11
Original
1852 people have browsed it

??

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>
Copy after login

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>
Copy after login
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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template