Windows installation composer

Source: Internet
Author: User
Tags readfile

Composer is a dependency management tool (not a package manager) for PHP. It allows you to declare the code base on which the project depends, and it installs them for you in your project.

Methods for installing under Windows one: using the Setup program

This is the simplest way to install Composer on your machine.

Download and run Composer-setup.exe, which installs the latest version of Composer and sets up the environment variables for the system, so you can use commands directly in any directory composer .

Method Two: PHP command installation

1. cmd into the command prompt, enter the installation directory

My installation directory is in (D:\composer),

2. Download Composer.phar

Input command: Php-r "ReadFile (' Https://getcomposer.org/installer ');" | Php

Note:

1) If the following error occurs, you need to set the environment variable (environment variable directory to the Php.exe directory) for PHP so that the global can access

2) If you receive a ReadFile error, please use the http link or turn it on in php.ini Php_openssl.dll

3. Create a new file in the Composer.phar sibling directory Composer.bat

Enter the command echo @php "%~dp0composer.phar" %*>composer.bat :

4. Close the current command-line window and open a new command-line window to test

Input command: composer-v

Note:

If the composer does not configure the environment variable, it can only run under the installation directory, otherwise it will report the following error;

Restart the computer if the environment variable is configured and the command still reports the following error in the new command-line window;

This manual installation is complete.

Composer Other installation details please refer to: http://docs.phpcomposer.com/00-intro.html

Windows 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.