Example tutorial on using Composer under Windows

零下一度
Release: 2023-03-10 16:02:01
Original
5011 people have browsed it

The following column composer usage tutorial will explain how to use Composer under Windows. I hope it will be helpful to friends in need!

Use Composer to introduce the official GitHub extension package under Windows

1. When you open the link to the Weiwu RC4 version, pull down and you can When you see this
, all you have to do is think about Baidu Composer and see what the hell it is. Don’t think too much and follow me.

Next click on the Composer Chinese document, then click download and you will see
After downloading, click on it as shown in the picture

Click next Later, I found that I don’t know how to continue. It’s normal. Here you are prompted to select the php.exe file under the php folder. Here I select it and then take a screenshot as follows:

Generally, when you get here, click Next and wait. There will be no problem in about three minutes.

It’s up to your personal preference. I didn’t click and just kept going until finish. Then, you are installed. Here I assume that you are installed.
The next step is to go to the official quick start manual

If you see it, you need to read more manuals, here is the ready-made one, keep going down
,
After opening the URL in the picture, you can see

Next, create a new folder tp5 under your root directory, and then create a new composer.json under the folder

After finishing the above part, I started typing commands. Are you very excited? As shown in the picture
,
After typing in the code, there is a long wait. After all, it is a download. It is not only a hard work. It’s just the internet speed. At least I'm still waiting.
While waiting, you can first download a Git to prepare for the following operations,

, here I have installed git

and see next The command window

shows that the download has been completed, which is very good. Then open the tp5 folder and find that it is the latest version of thinkphp5.0RC4 version framework. Continue to write the command: First

Then

The following is the key. Open cmd under the folder where the tp5 project is opened, and enter the composer command mentioned above: composer require topthink/think-captcha
Wait for a while. You will see the following picture:

Now the Git installed in advance is going to show its skills. Here it is prompted that git is not an internal command. It doesn’t matter. Let’s go:

Single Click Computer->Properties->Advanced System Settings->Environment Variables->Double-click PATH-> Paste the Git path you copied before after this string of letters. Remember to overwrite it by adding a semicolon first and then copy it to Later, as shown in the picture above:


After clicking OK, return to the command window and re-enter the previous composer command:

If you look at your project folder tp5, there is a vendor folder under it. Under the tothink file inside is the expansion package you loaded in

The above is the detailed content of Example tutorial on using Composer under Windows. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template