thinkphp3.2.3 file structure introduction

【Foreword】

       This article summarizes the thinkphp file structure directory

 

【main body】

      Check the file structure after decompression. Compared with the full version, the core version only has ThinkPHP, and there is no other directory structure. While the full version includes additional demo files

①The first layer of file structure

Application: application directory;

Public: The directory for storing public static resource files such as images, css, and js;

ThinkPHP: framework core directory;

.htaccess: Distributed configuration file, configure the site with Alpha;

composer.json: json is a data format, containing some descriptive descriptions, mainly for the description files used by composer (a foreign software) software, which is blocked in China, so it is useless. It can be understood as the management software description information similar to the software housekeeper

index.php: The entry file of the project, generally a single entry, or multiple entries

README.md: Description file, can be ignored

 

Composer.json file details :

{
    "name": "topthink/thinkphp",//名字
    "description": "the ThinkPHP Framework",//描述
    "type": "framework",//类型
    "keywords": ["framework","thinkphp","ORM"],//关键词
    "homepage": "http://thinkphp.cn/",//主页
    "license": "Apache2",//Apache2许可
    "authors": [
        {
            "name": "liu21st",
            "email": "[email protected]"
        }
    ],
    "require": {
        "php": ">=5.3.0"//Required environment, minimum php5.3.0 version
    },
    "minimum-stability": "dev"//minimum stability
}

 

 

③index.php detailed explanation:

// application entry file

// Check the PHP environment
if(version_compare(PHP_VERSION,'5.3.0','<'))  die('require PHP > 5.3.0 !');
// Turn on debug mode, it is recommended to turn on the deployment phase comments in the development phase or set it to false
define('APP_DEBUG',True);
// Define the application directory, and the files automatically generated later will be placed in it
define('APP_PATH','./Application/');
// Import the ThinkPHP entry file
require './ThinkPHP/ThinkPHP.php';
// dear ^_^ no need for any code behind it, it's that simple

 

④Details of Application application files:

index.html: directory security file, empty file;

README.md: read me file, explanatory file;

 

⑤ Detailed explanation of the core file ThinkPHP:

Common (common): system function library directory; 

                           functions.php: system function library, functions encapsulated in the system; (the custom function library function.php will be used later)

Conf: system configuration file directory;

                            convention.php (convention): system configuration file;

 Extension: In addition to the convention.php configuration file, there are other configuration files in ThinkPHP. But convention.php is a system-level configuration file. There are application level, group level.

 ① That is, the configuration files are divided into 3 categories: system configuration files, application configuration files, and group configuration files. The location and scope of action are different;

 ②Scope of action: System > Application > Grouping;

 ③Priority: Group > Application > System (the higher the priority, the higher the priority)              

Lan: language pack directory (en-us.php for American English; pt-br.php for British English; zh-cn.php for simplified Chinese; zh-tw.php for traditional Chinese);

Library: The core directory of the ThinkPHP directory;

                          Think: the core file of the core file;

                  

Mode: mode (not commonly used);

Tpl: system template directory, including the templates used by the system (3 system template files);

                         dispatch_jump.tpl: Jump template

                         page_trace.tpl: trace information template

                         think_expection.tpl: exception template

LICENSE: license file;

logo.png:thinkPHP的Logo;

THINKPHP.php: Project interface file, public entry file, THINKPHP entry file introduced in the application entry file index.php. It needs to be introduced by the project entry file during later development

 

 

 

 

 

 

.

Guess you like

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