Home>Article>Backend Development> Installation and setting of global variables of composer under windows
Composer is a tool used by PHP to manage dependency relationships. You can declare the external libraries (libraries) you depend on in your project, and Composer will install these dependent library files for you.
1. Use the installer
to download and fool-proof installation:Composer-Setup.exe
2. Manual installation
2.1 Change directory and download composer.phar
Enter dos command:
php -r "readfile('https://getcomposer.org/installer');" | php
2.2 Move composer.phar
If the directory you downloaded is not in php, please move it to php
3. Set global variables
3.1 Create a new composer.bat
##composer.bat and composer.phar are in In the same folder, and don’t enter anything
3.2关键步骤
输入命令:
echo @php "%~dp0composer.phar" %*>composer.bat
3.3测试
在随意目录下输入:
composer -v
更多PHP相关问题请访问PHP中文网://m.sbmmt.com/
The above is the detailed content of Installation and setting of global variables of composer under windows. For more information, please follow other related articles on the PHP Chinese website!