Phpstudy Composer using the installation

Source: Internet
Author: User
Tags install php

I am a Windows system

Phpstudy is the latest 2018 version

To install the Laravel framework as an example

One by one, click PHP Composer to appear the system command box, according to the Command box path to find the file

Two red boxes in the file delete

Three in the instruction box input instruction

Since I have downloaded the following instructions, I can't.

Reference article https://pkg.phpcomposer.com/#how-to-install-composer

1. Be sure to install PHP correctly before installing. Open a command-line window and perform a php -v check to see if the version number is output correctly.

2. Open the command line and execute the following command sequentially to install the latest version of Composer

Download the installation script- composer-setup.php -to the current directory

"copy (' Https://install.phpcomposer.com/installer ', ' composer-setup.php '); "

3. Perform the installation process.

PHP composer-setup.php

4. Delete the installation script.

"unlink (' composer-setup.php '); "

Four set system global variables, see my article https://www.cnblogs.com/wen-zi/p/9072547.html

The global installation is to install Composer PATH under the path contained in the system environment variable, and then execute the command directly in the command composer -line window.

There are also PHP (Php.exe directory) global variables placed into the system environment variable path such as E:\PHPTutorial\php\php-5.6.27-nts; E:\PHPTutorial\php\php-5.4.45-nts; E:\PHPTutorial\php\php-5.5.38; E:\PHPTutorial\tools\composer

Mac or Linux system:

Open a command-line window and execute the following command to move the previously downloaded composer.phar file to the /usr/local/bin/ directory:

Copy
sudo mv composer.phar /usr/local/bin/composer
Windows System:
    1. Locate and go to the installation directory of PHP (and the instructions you execute on the command line php should be the same set of PHP).
    2. will be composer.phar copied to PHP under the installation directory, that is, and php.exe in the same level directory.
    3. Create a new file in the PHP installation directory composer.bat and save the following code to this file.
Copy
@php "%~dp0composer.phar" %*

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

Five Download Example Laravel framework

Reference article http://laravelacademy.org/post/306.html

1, open the new command box, click on the lower left corner of the computer, enter CMD

2, enter the command to your corresponding project file path

For example, I put it in dome.

Instructions

Not the same disk must remember to switch to the corresponding disk, d disk is cd/d; The F-plate is cd/f, followed by the corresponding file path

The rest of the operation is the same as the link above

Phpstudy Composer using the installation

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.