: This article describes how to install Composer in the MacOS environment. For more information about PHP tutorials, see. Introduction
Composer is a dependency management tool for PHP.
Installation process
Open the terminal and enter the following command:
Enter the user root directory
cd ~
Run the Installation Command
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
After the installation is successful,composer.phar
File
To enablecomposer
Change to global command
We need to executemv composer.phar /usr/local/bin/composer
In this way, you only need to open the terminal to usecomposer
Command
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above describes how to install Composer in the Mac OS environment, including some content, and hope to be helpful to friends who are interested in PHP tutorials.