installation of composer

1. First go to the official website of composer  https://getcomposer.org/  select download, pull down to see

Then select the latest version to download

2. The file name should be composer.phar. Paste this under the file directory of your php. It is in the same level directory as the php.exe file. I use phpstudy. This depends on what environment is used.

3. Then in the same level directory of php.exe, create a new composer.bat file and write in it

@ECHO OFF
php "%~dp0composer.phar" %*

4. Then set the environment variables, mine is window10 system This computer - "Properties -" Advanced system settings - "Advanced - "Environment variables Find the system variable Path System variables can be used globally, and user variables can only be used by the current user.

After finding Path, copy the path of the file where php.exe is located to Path.

5. Open the command prompt (window+r), enter cmd and then enter the composer -v command, if it shows

Indicates that the installation of composer was successful

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325214499&siteId=291194637