Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use phpstudy composer

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how to install and use phpstudy composer. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

I am windows system.

Phpstudy is the latest version 2018

Take installing the laravel framework as an example

As in figure 1, click php Composer to display the system instruction box and find the file according to the path of the instruction box

Delete the files in the red box

Enter instructions in the instruction box

Since I have downloaded the screenshot of the following instructions, I will not take the screenshot.

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

1. Make sure that PHP is installed correctly before installation. Open a command line window and execute php-v to see if the publication number is typed correctly.

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

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

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

3, perform the installation process.

Php composer-setup.php

4. Delete the installation script.

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

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

The global installation installs Composer under the path contained in the system environment variable PATH, and then you can execute the composer command directly in the command line window.

There is also the path of the php (php.exe directory) global variable placed in the system environment variable

For example, 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 systems:

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/composerWindows system: locate and enter the PHP installation directory (the same set of PHP as the php instructions you executed on the command line). Copy composer.phar to the installation directory of PHP, that is, at the same level as php.exe. Create a new composer.bat file under the PHP installation directory and save the following code to this file. Copy

@ php "% ~ dp0composer.phar"% *

Finally, reopen a command-line window and try to execute composer-- version to see if you have typed the publication number correctly.

Download example laravel framework

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

1. Open a new instruction box, click in the lower left corner of the computer, and type cmd

2. Enter instructions to your corresponding project file path

For example, I put it on dome.

Instruction

If you are not on the same disk, you must remember to switch to the corresponding disk. Disk d is cd / d; disk f is cd / f, followed by the corresponding file path.

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

Thank you for reading! About how to install and use phpstudy composer to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report