Home  >  Article  >  Development Tools  >  Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

藏色散人
藏色散人forward
2020-03-25 11:46:022732browse

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

The following tutorial is for windows system, the example system uses win7.

composerInstallation

Download the composer installation package (in the group) and click to install.

When ‘composer choose the command-line php’ appears and requires selection, choose to find the installation directory of wanm64. Find bin->php->php7.0.10->php.exe and select it.

Click to install.

After the installation is successful, enter Win R —>cmd to enter the command window, enter composer -v (no semicolon is required), and click Enter. If the following pattern appears, the composer is successfully installed (the following is a partial screenshot):

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

And composer.json will appear in the project. The sample picture is as follows:

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

Use composer to install the image processing class library

win R -> cmd to enter the command line interface, enter the following command, modify the composer configuration file, and use the domestic image:

composer config -g repo.packagist composer https://packagist.phpcomposer.com

The example picture is as follows:

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

Enter the root directory of the project:

Take the project root directory on this computer as an example (D:\run\wamp64\www\hs\hs_store).

First enter ' D: ' to switch to the D drive directory:

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

After switching to the D drive, enter ' cd run ' to switch to the D drive run Under contents. And so on,

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

Introduction to the installation of ThinkPHP composer and loading of image processing class libraries

until you switch to the project root directory.

Enter the following command at this time:

composer require topthink/think-image

to load the image class library.

Introduction to the installation of ThinkPHP composer and loading of image processing class librariesAfter the download is completed, you can see three new items in the vendor folder under the project root directory:

Introduction to the installation of ThinkPHP composer and loading of image processing class librariesClick on the topthink folder to see that the think-img folder exists. At this time, the class library has been successfully loaded.

The above is the detailed content of Introduction to the installation of ThinkPHP composer and loading of image processing class libraries. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete