The installation and file structure of thinkPHP5.0 framework

1. What is the thinkPHP framework?

Answer: ThinkPHP is a free open source, fast and simple object-oriented lightweight PHP development framework, which was born for agile WEB application development and simplified enterprise application development.

2. The operating environment of thinkPHP5.0.

  • PHP >= 5.4.0 (Perfect support for PHP7)

  • PDO PHP Extension (PDO extension in PHP)

  • MBstring PHP Extension (MBstring extension in PHP)

  • CURL PHP Extension (CURL extension in PHP)

3. Installation of thinkPHP5.0

a) Source code 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 (www)

        4. Rename tp5

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

b) composer

       1. The official website
                        composer is a tool used by PHP to manage dependency relationships. Similar to yum source in linux.

        2. Download address

            https://getcomposer.org/download/

        3. Install composer

            Double-click the software, click next to install

        4. Check whether the software is installed successfully

            1. win+r enter cmd and press Enter

            2. Enter composer
                  composer After successful installation:

        1. First switch to the root directory of the website (www) from the command line

        2. Switch domestic mirror
                          composer config -g repo.packagist composer https://packagist.phpcomposer.com

        3、安装tp5.0
                         composer create-project topthink/think composer_tp5 --prefer-dist

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

C) git

        1. Introduction
                           Git is a free and open source distributed version control system for agile and efficient handling of any small or large projects.

        2. Installation

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

        3. Check whether the installation is successful

            Enter git on the command line

       After git installation is successful:

        1. First switch to the root directory of the website (www) from the command line

        2. Copy the project warehouse
                            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. Enter
                             http://localhost/git_tp5/public/ in the address bar

4. thinkPHP5.0 file directory structure

    |--application application directory is the core of the entire website
               |---|---index front-end directory
               |---|-----|---controller controller
               |---|-----|- --model data model
               |---|-----|---view page
               |---|---admin background directory
               |-extend extended class library directory 
               |-public static resource and entry file
               |-- -|---static store static resources css, js, img
               |---|---index.php entry file
               |-runtime website running temporary directory
               |-tests test directory
               |-core file of thinkphp TP framework
               |-- -|---lang language pack
               |---|---library TP core file
               |---|---tpl template page
               |-vendor third-party extension directory

 

 

 

Guess you like

Origin blog.csdn.net/qq_43269730/article/details/99718985