ThinkPHP5.0 framework installation tutorial

Source: Internet
Author: User
Tags git client
This article mainly introduces the thinkPHP5.0 framework installation method, briefly introduces the thinkPHP5.0 installation environment, common installation methods, and related precautions, if you need thinkPHP5.0, you can refer to the next article to introduce the thinkPHP5.0 framework installation method, and briefly introduce the thinkPHP5.0 installation environment, common installation methods, and related precautions. if you need thinkPHP5.0, you can refer

This document describes how to install the thinkPHP5.0 framework. We will share this with you for your reference. The details are as follows:

The ThinkPHP5 environment requirements are as follows:

PHP> = 5.4.0
Pdo php Extension
MBstring PHP Extension
Curl php Extension

Strictly speaking, ThinkPHP does not need to be installed. the installation mentioned here is to put the ThinkPHP framework into the WEB Runtime Environment (provided that your WEB runtime environment is OK ), you can obtain and install ThinkPHP in two ways.

1. download ThinkPHP installation

There are many ways to get ThinkPHP. the official website (thinkphp1.cn) is the best download and documentation source.

II. use Composer for installation

ThinkPHP supports the use of Composer for installation. if you have not installed Composer, you can follow the methods in Composer installation. In Linux and Mac OS X, run the following command:

curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr/local/bin/composer

In Windows, you need to download and run the Composer-Setup.exe.

If you have any questions or want to learn more about Composer, refer to the Composer document (English) and Composer Chinese.

If you have installed Composer, make sure that the latest version is used. you can use the composer self-update command to update Composer to the latest version.

Then, switch to your web root directory under the command line and execute the following command:

composer create-project topthink/think tp5 dev-master --prefer-dist

Because it has not yet been officially released, use the dev-master branch first.

If an error occurs, follow the prompts or refer to the Composer Chinese document.

If the access speed to composer in China is slow, you can refer to the instructions here to use domestic images.

III. install Git

If you are not familiar with Composer or think that Composer is too slow, you can also use the git version library to install and update it. ThinkPHP5.0 is split into multiple repositories, including:

Application Project: github.com/top-think/think
Core Framework: github.com/top-think/framework

It is designed to separate applications from core warehouses to support Composer to independently update the core framework.

First, clone and download the application project repository.

git clone https://github.com/top-think/think tp5

Switch to the tp5 directory and clone the core framework repository:

git clone https://github.com/top-think/framework thinkphp

After cloning the two repositories, you can download the ThinkPHP5.0 Git method. to update the core framework, you only need to switch to the thinkphp core directory and execute:

git pull https://github.com/top-think/framework

If you are not familiar with the git command line, you can use any GIT client to perform operations.

No matter what method you use to 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/

If the browser outputs:

Congratulations! now ThinkPHP has been installed!

If you cannot run normally and display the ThinkPHP welcome page, check your server environment:

① PHP5.4 or above(Note: PHP5.4dev and PHP6 are not supported)

② Whether the WEB server is properly started

The above is a detailed description of thinkPHP5.0 framework installation tutorial. For more information, see other related articles in the first PHP community!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.