Install composer under Windows

Source: Internet
Author: User
Tags readfile

Composer is not a package manager. Yes, it involves "packages" and "libraries", but it is managed on a per-project basis and installed in a directory of your project (for example vendor ). By default it will not install anything globally. Therefore, this is only a dependency management.

Composer will solve this problem for you:

A) You have a project that relies on a number of libraries.

b) Some of these libraries depend on other libraries.

c) You declare what you depend on.

d) Composer will find out which version of the package needs to be installed and install them (download them to your project).

Setting PHP Environment variables

Environment variables Even if the method is effective

Enter DOS input

Set

Close the DOS window. Open the DOS window again

Echo%PATH%

Download the installation file

Command Line Input

" ReadFile (' Https://getcomposer.org/installer '); " > composer-setup.php

Note: If you receive a ReadFile error message, use the http link or turn on Php_openssl.dll in php.ini.

Which directory the DOS command line is pointing to and which directory the files will be downloaded to

Perform

PHP composer-setup.php

Download down a Composer.phar file

will be composer.phar copied to PHP under the installation directory, that is, and php.exe in the same level directory.

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

" %~dp0composer.phar " %*

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

Install composer under Windows

Related Article

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.