Home > Article > Backend Development > Detailed explanation of thinkPHP5.0 framework installation tutorial
This article mainly introduces the thinkPHP5.0 framework installation method, briefly introduces the thinkPHP5.0 installation environment, common installation methods and related Notes, friends in need can refer to the following
The example in this article describes the installation method of thinkPHP5.0 framework. Share it with everyone for your reference, the details are as follows:
The environment requirements of ThinkPHP5 are as follows:
##PHP >= 5.4.0PDO PHP Extension
MBstring PHP Extension
CURL PHP Extension
install ThinkPHP in two ways.
1. Download and install ThinkPHP
There are many ways to obtain ThinkPHP. The official website (thinkphp.cn) is the best source for downloading and document acquisition.2. Install using Composer
Linux and Mac OS X you can run the following command:
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composerIn Windows, you need to download and run Composer-Setup.exe. If you encounter any problems or want to learn Composer more deeply, please refer to the Composer documentation (English), Composer Chinese. If you have already installed Composer, please make sure you are using the latest version. You can use the composer self-update command
Update Composer to the latest version.
Then on the command line, switch to your web root directory and execute the following command:composer create-project topthink/think tp5 dev-master --prefer-distSince it has not been officially released yet, use the dev-master branch first. If an error message appears, please follow the prompts or refer to the Composer Chinese documentation. If access to composer in China is slow, you can refer to the instructions here to use domestic mirroring.
3. GitInstallation
If you don’t know Composer well or think Composer is too slow, you can also use the git repository to install and update. ThinkPHP5.0 is split into multiple warehouses, mainly including: Application project:github.com/top-think/think
Core framework: github.com/ top-think/framework
git clone https://github.com/top-think/think tp5Then switch to the tp5 directory, and then clone the core framework warehouse:
git clone https://github.com/top-think/framework thinkphpAfter the two warehouses are cloned, ThinkPHP5 is completed .0 Git download, if you need to update the core framework, you only need to switch to the thinkphp core directory, and then execute:
git pull https://github.com/top-think/frameworkIf you are not familiar with the git command line, you can use any GIT client to operate , will not be explained in detail here. No matter how you obtain the ThinkPHP framework, you only need to do the last step to verify whether it is running normally. Enter the address in the browser:
localhost/tp5/public/
① PHP5.4 or above(Note: PHP5.4dev version and PHP6 are not supported)
② Whether the WEB server starts normally
The above is the detailed content of Detailed explanation of thinkPHP5.0 framework installation tutorial. For more information, please follow other related articles on the PHP Chinese website!