Breaking News
Home / Web / PHP / PHP Howto / How to initialize Yii for development environment?

How to initialize Yii for development environment?

mini:yii2 user$ pwd
/Users/user/workspace/projects/web/root/yii2
mini:yii2 user$ cd apps/advanced/
mini:advanced user$ ls -lt
total 80
-rw-r–r– 1 user staff 1622 May 21 21:47 LICENSE.md
-rw-r–r– 1 user staff 5616 May 21 21:47 README.md
drwxr-xr-x 11 user staff 374 May 21 21:47 backend
drwxr-xr-x 7 user staff 238 May 21 21:47 common
-rw-r–r– 1 user staff 1395 May 21 21:47 composer.json
drwxr-xr-x 9 user staff 306 May 21 21:47 console
drwxr-xr-x 5 user staff 170 May 21 21:47 environments
drwxr-xr-x 12 user staff 408 May 21 21:47 frontend
-rw-r–r– 1 user staff 4288 May 21 21:47 init
-rw-r–r– 1 user staff 514 May 21 21:47 init.bat
-rw-r–r– 1 user staff 4360 May 21 21:47 requirements.php
drwxr-xr-x 3 user staff 102 May 21 21:47 vendor
-rw-r–r– 1 user staff 518 May 21 21:47 yii.bat
mini:advanced user$ init
-bash: init: command not found

mini:advanced user$ chmod +x init
mini:advanced user$ ./init
Yii Application Initialization Tool v1.0

Which environment do you want the application to be initialized in?

[0] Development
[1] Production

Your choice [0-1, or “q” to quit] 0

Initialize the application under ‘Development’ environment? [yes|no] yes

Start initialization …

generate backend/config/main-local.php
generate backend/config/params-local.php
generate backend/web/index-test.php
generate backend/web/index.php
generate common/config/main-local.php
generate common/config/params-local.php
generate console/config/main-local.php
generate console/config/params-local.php
generate frontend/config/main-local.php
generate frontend/config/params-local.php
generate frontend/web/index-test.php
generate frontend/web/index.php
generate yii
chmod 0777 backend/runtime
chmod 0777 backend/web/assets
chmod 0777 frontend/runtime
chmod 0777 frontend/web/assets
chmod 0755 yii

… initialization completed.

mini:advanced user$[pb_builder]

Advertisment ad adsense adlogger