Home > PHP Framework > ThinkPHP > Entry-level introduction to thinkphp framework execution process

Entry-level introduction to thinkphp framework execution process

藏色散人
Release: 2021-03-02 09:02:55
forward
2495 people have browsed it

The following tutorial column will introduce the thinkphp framework execution process to you in the thinkphp tutorial column. I hope it will be helpful to friends in need!

thinkphp framework execution process

First of all, let’s summarize the general process of framework execution:

index.php-> Load the framework->Read configuration items->Generate application->Load classes->Frame new methods of these classes->Template rendering display;

Specific classes And the file is as follows:

--> index.php (entry, debug mode, application path)

--> ThinkPHP.php (definition path and access mode)

--> Think\Think (class loader, exception handling, reading shared configuration)

--> Think\App (request url scheduling parsing, execution scheduling parsing results)

--> exec executes the Action method of the user-defined Controller

--> Think\Dispatcher (parses M, C, A and parameters according to the url pattern, and loads the module configuration)

--> Think\Controller (calling view, packaging and redirection)

As you can see, the internal process of the framework is actually relatively simple, and there are two very important classes:

Think\Hook: Monitor each stage of App, Action, and View, and execute Behavior

Think\Behavior: Configurable (configuration file) can be added and deleted (code)

Recommended : The latest 10 thinkphp video tutorials

The above is the detailed content of Entry-level introduction to thinkphp framework execution process. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template