In thinkphp, there are four main types of views, namely 1, Normal mode, 2: Path mode, 3: Override mode, 4: Compatibility mode.
In the beginning of the development of the learning process, it is recommended to use the path mode, when the production, the use of rewrite mode, so here first mainly talk about the path mode:
Here is a copy of my own:
How you understand the path pattern is relatively clear, as you will certainly ask, ask what not to specify the view file of the parent directory, this problem I should not be anxious to solve, because in the back of the study will be the primary key know, and, even if you know what to ask, will not understand its true essence.
When we get here, I have to say that if I send this request to the browser to get the whole process of this view page, though I have said it once before, but, each time the understanding is not the same freshness, I understand the runtime so:
First, the browser makes the request, and then the server receives the request, the first thing to do is not to find which page, but to find the import file, request any frame of the file to pass through the portal file, then from the import file to get a variety of information will be executed according to its specifications, of course, This process will also run to the configuration file inside to read the configuration, when these foreplay is completed, then began to find our module, the corresponding direct kill to our controller, in the controller, this is equivalent to our to, there is a processing and distribution of the role, here we did not explain the processing, only with $this-> Display (); It is possible to complete the assignment, about his distribution, this is the TP of the total specification, like Zend, this is relatively good understanding some, he will be the default point to it; with the controller class name as a folder under the method name of the view file so that a point, and thus, We asked for this page.
thinkphp path mode and program run route