Windows Global Installation composer

Source: Internet
Author: User

Windows system: Download Composer

A. cmd into the installation directory of PHP, example: E:\wamp\bin\php\php5.5.12, and then execute the following command to install the latest version of Composer:

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

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

The functions of the above 3 commands are:

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

Two. Finished downloading, now the global installation.

1. Enter the installation directory for PHP

2. Create a new file in the PHP installation directory composer.bat and save the following code to this file.

  @php "%~dp0composer.phar" %*

3. Add the PHP environment variable. Right-click My Computer-Properties-Advanced system settings-environment variables. Locate the "system variable" named path, double-click Edit, and at the end of the add semicolon and PHP directory location, such as; E:\wamp\bin\php\php5.5.12

Finally reopen a command-line window and try it out to composer --version see if the version number is correctly printed.

Output Composer version 1.4.1 2017-03-10 09:29:45

Get!!!!!!!!!!!!!!!!!!!!!!!

Broken things composer, installation fee Saad, gas dead ME!!!!!

Windows Global Installation composer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.