What is the framework?
Bunch is a collection of code, which contains variables, functions, classes, constants, which also has design patterns, MVC, AR database, like a single embodiment.
Why use frameworks?
Using the framework can save effort, rapid, stable and efficient system set up program; can maintain itself, and flexibility to adapt to customers' needs to maximize the enhanced focus on the business side.
After extracting ThinkPHP:
Folder:
the Application: store the project folder
Public: public storage, generally do not
ThinkPHP: Core folder
files:
index.php: project entry file
.htaccess
composer.json
README.md
ThinkPHP include:
the Common: Kernel Library
Conf: Profile
Home:
Lang: Language Pack
Library: core repository to store core class file
Mode: model folder
Runtime
TPI: template
ThankPHP.php: entry file
The file may be modified to redefine the folder items stored by the file entry
in the new project folder still Common (function), Conf (configuration), Home (program modules: Common, Conf, Controller, Model , View) Folder
MVC: three-tier convention over configuration
M: Model Data Model layer operations
V: View View layer provides a display template
C: Controller logic tier business logic (IndexController.class.php)
Different access methods:
Before: page visits
MVC: operations under the Access Controller (method), not a specific page
MVC access four ways:
1.http: // URL /index.php (file entry) / m = XX (module) & c = XX (controller) & a = XX (operation) get mode?
2.http: // URL /index.php (file entry) / Home (module) / Index (Controller) / (Method) path
3.http: // URL / Home (module) / Index (Controller) / (Method) overwriting
4.http: // URL /index.php (entry file) / s = / module / controller / method compatible?
URL can be set to generate a URL address, you can not set the access mode
The U-( "module / controller / method") method, rapid generation path
Access Templates:
The need to establish the same name with the controller in Home / View inside the folders, files created in this file only accessible
Add 'SHOW_PAGE_TRACE' in Home / Conf in => TRUE, the page operation can view details