YII2 Basic version Window installation steps
1. The window needs to download and run Composer-setup.exe
Self-Baidu search composer Download installation
Composer after installation, switch to a WEB-accessible directory
2. Enter the DOS command window via windows ' cmd ' command and execute the following command:
Composer global require "fxp/composer-asset-plugin:~1.1.1";
PS:1.1.1 and installed composer version number corresponds to
3. After installation, enter the command:
Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-basic basictest;
Ps:yiisoft/yii2-app-basic basictest The last basictest is a folder name that can be customized
4, modify the config/web.php file, add a key to the Cookievalidationkey configuration item (if you install through Composer, This step is completed automatically):
// !!! Insert a key below (if blank)-For cookie validation ' cookievalidationkey ' = ' Enter your key here ',
5. Verifying the results of the installation
Once the installation is complete, you can use the browser to access the newly installed YII application via the following URL:
http://localhost/basic/web/index.php
This URL assumes that you have Yii installed in a basic directory located in the root directory of the Web document and that the Web server is running on your own computer (localhost). You may need to adjust it to fit your installation environment.
Windows YII2 Installation