Home > Development Tools > composer > Detailed description of windows installation composer

Detailed description of windows installation composer

藏色散人
Release: 2021-01-13 15:54:37
forward
2167 people have browsed it

The following column will introduce you to the windows installation composer tutorialcomposer , I hope it will be helpful to friends in need!

Detailed description of windows installation composer

1.

Ensure that the php environment variable has been set, and the variable address is the directory where php.exe is located

Run php -v OK Return to php version

2.

php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"

php composer-setup.php

php -r "unlink('composer-setup.php');"
Copy after login

Execute the first command to download the composer-setup.php script that will simply detect php.ini Parameter settings in, if some parameters are not set correctly, a warning will be given; then download the latest version of the composer.phar file to the current directory.

The functions of the above three commands are:

1. Download the installation script - composer-setup.php - to the current directory.
2. Execute the installation process.
3. Delete the installation script.

3.

Windows system:

1. Find and enter the PHP installation directory (the php command you executed on the command line should is the same set of PHP).

2. Copy composer.phar to the PHP installation directory, which is the same level directory as php.exe.
3. Create a new composer.bat file in the PHP installation directory and save the following code into this file.

4.@php "%~dp0composer.phar" %*

Finally reopen a command line window and try to execute composer - -version Check whether the version number is correctly output.

四、

composer config -g repo.packagist composer https://packagist.phpcomposer.com
Copy after login

The above is the detailed content of Detailed description of windows installation composer. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template