Home  >  Article  >  Development Tools  >  How to set composer to be globally available

How to set composer to be globally available

藏色散人
藏色散人forward
2021-06-01 15:51:432407browse

The following tutorial column of composer will introduce to you how to set composer to be globally available. I hope it will be helpful to friends in need!

Composer is divided into two methods:

The first: partial installation:

Copy the Composer.phar file to any directory, such as a project The root directory, and then use the php composer.char command to use Composer

Second: Global installation

How to operate the Window system?

Copy Composer.char to the same directory as php.exe
Create a new Composer.bat file and save the following code into the file
@php “%~dp0composer.phar” %*

How to check whether composer is successfully installed?

The above is the detailed content of How to set composer to be globally available. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete