Composer is a tool similar to yum in centos to solve dependencies. PHP has to solve its dependencies...
First, install Composer
Go to https://getcomposer.org/ and go to download. It is available for both linux and windows, and the installation is very simple.
http://www.phpcomposer.com/ Chinese mirror.
Second, configure Composer to the domestic mirror
http://pkg.phpcomposer.com/ Here is how to configure the domestic mirror, which will be much faster.
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced ../yii2
The above command will create an advanced version of yii in the ../yii2 folder
Third, try
I still don’t quite understand Composer, so I directly put the composer.json created above into an empty folder, execute composer install in it, and only see a vendor folder coming out.
In the middle, I got a prompt that the git command was not found. Just change the environment variables.
The above introduces the yii2 study notes (2) Composer installation, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.