In Windows, you first need to download and run the Composer-setup.exe
Installation process to select the running directory of PHP, installed in Windows under the CMD run composer to see if the installation was successful.
The image above shows that the installation was successful.
Switch to program execution directory under CMD to execute the following program
Composer Global require "fxp/composer-asset-plugin:1.2.0
Execute after Success
Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced E:/apiweb/bootstrap/apidoc
Note: E:/apiweb/bootstrap/apidoc is the directory of the program, it is recommended to write a full directory
After waiting for a long time, note that you also need to write GitHub on the token, specific methods to obtain the query.
Looking at the above procedure is simple, but often the actual operation will be a variety of problems, the following is a summary of the various problems.
question one: lack of OpenSSL.
Workaround: Open in php.ini; Extension=php_openssl.dll, remove the semicolon, open the extension
Phpinfo View after success
question two: lack of mbstring
WORKAROUND: Open the extension in php.ini; Extension=php_mbstring.dll, remove the semicolon, open the extension
question three: Look at the picture below
This problem has been checked a lot of said that may be composer-asset-plugin:~1.1.1 version is too low, you have to upgrade it.
Composer Global require "fxp/composer-asset-plugin:1.2.0
Follow the previous steps to go through, execute this command, execute the installation command, wait patiently, MA, the problem still, continue to find the final solution is
Composer Global require "fxp/composer-asset-plugin:~1.2.0
Comrades found that different, take a closer look at it, the implementation of the installation of the step finally passed, finished.
The completion of the basic installation is complete, and the following steps are initialized
First enter your installed project directory to find the init script
1. Execute init script
2, select 0 development environment, 1 build environment
3, whether to determine: Yes
After installation by Access:/apidoc/frontend/web/index.php This path can see the Yii Welcome home page.