ThinkPHP5

ThinkPHP 框架的执行流程

2017-08-30  本文已影响43人  xiaojianxu

index.php -> 入口文件

// 引入框架初始化文件

require './ThinkPHP/ThinkPHP.php'; 

/*
  该文件的作用是:
 1、定义各种常量;
 2、加载框架的核心类 ThinkPHP/Library/Think/Think.class.php;
 3、应用初始化,Think\Think::start();
*/

Think.class.php -> 框架核心类

// 该文件主要作用,加载各种系统文件:

ThinkPHP\Common\functions.php
ThinkPHP\Library\Think\Hook.class.php
ThinkPHP\Library\Think\App.class.php
ThinkPHP\Library\Think\Dispatcher.class.php
ThinkPHP\Library\Think\Route.class.php
ThinkPHP\Library\Think\Controller.class.php
ThinkPHP\Library\Think\View.class.php
ThinkPHP\Library\Behavior\BuildLiteBehavior.class.php
ThinkPHP\Library\Behavior\ParseTemplateBehavior.class.php
ThinkPHP\Library\Behavior\ContentReplaceBehavior.class.php

上一篇 下一篇

猜你喜欢

热点阅读