1. Install Composer
tp5 supports installation using composer, which is really convenient.
download link:
https://www.phpcomposer.com/
After installation, your PATH environment variable will be automatically set
2. Enter the CMD command line interface
In order to increase the speed, it is recommended to use a domestic mirror site.
composer config -g repo.packagist composer https://packagist.phpcomposer.com
cd to the web directory and execute the following command:
Version 5.1
composer create-project topthink/think tp5 --prefer-dist
Version 6.0, note: (ThinkPHP6.0 operating environment requires PHP7.1+.)
composer create-project topthink/think=6.0.x-dev tp
Wait for the installation to complete, there will be a tp5 folder when you visit the web site.
tp5 does not have a built-in verification code and image processing class, we need to manually install it, enter the directory and execute the following code to install the verification code class.
composer require topthink/think-captcha
Execute the following code to install the image processing library.
composer require topthink/think-image
In this way, the main part of tp5 is installed.