tp5.0 installation

 

1. Test the environment of Tp5.0

  • PHP >= 5.4.0
  • PDO PHP Extension
  • MBstring PHP Extension
  • CURL PHP Extension

Open http://localhost to see if the above environment is met

Second, there are three installation methods,

a) Source code package installation

    1. Go to thinkphp official website (www.thinkphp.cn) to download the full version of TP5.0

    2. Unzip the compressed package

    3. Copy the decompressed file to the root directory of the website

    4. Rename tp5

    5. Visit http://localhost/tp5/public in the address bar

 

b) composer install

    1. Official website (http://www.phpcomposer.com/)

        Composer is a tool used by PHP to manage dependencies. Similar to yum source in linux.

    2. Download address

        https://getcomposer.org/download/

    3. Install composer

        (1) Double-click the software and install it directly with next

                    

        (2) Depends on php.exe in the environment, next

                    

        (3) Direct next

                    

        (4) Direct install

                    

        (5) Direct next

                    

    (6)finish

                    

    4. Check whether the software is installed successfully

            (1) win+r enter cmd to enter the command line

            (2) Enter composer, and the following interface appears, which means the installation is successful

                

c) composer install tp5

    1. Switch to the root directory of the website from the command line

    2. Switch to domestic mirror

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

     3. Install tp5.0

composer create-project topthink/think tp51  --prefer-dist

    4. Visit http://localhost/tp51/public in the address bar

d)go

    1 Introduction

    Git is a free, open source distributed version control system for handling any project, small or large, with agility and efficiency.

    2. Installation

    Find the corresponding software, double-click to install, click next

    3. Check whether the installation is successful

    Enter git at the command line

e) Install tp5.0 using git

    1. First, switch to the root directory of the website from the command line

    2. Copy the project repository

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

    3. Switch to the git_tp5 directory

    4. Copy the core framework code

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

    5. Visit http://localhost/git_tp5/public in the address bar

f) Comparison of three installation methods

    1. The source code package is the most convenient to download

    2, git can get the latest code

    3. It is recommended that you use the source code package to download

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325864483&siteId=291194637