We are in the actual development of the site is often the beginning and the beginning of the separation, and TP This is also very user-friendly, he left us an include tag can be directly introduced to the tail and the site.
The site we are going to do is, of course, no exception, separated from the tail:
We first use the browser code to view the plug-in analysis of the art to prepare the source:
, here is clearly divided into 3 parts, because most of the site head and tail are basically consistent, so we also use TP to reserve the label for us, we first go back to the Home view directory to create a folder called public, mainly used to place our site head and tail part:
Here we'll split the tail and back parts of the code and put it here:
And then go back to our Home View folder.
They are then directly introduced into the month via the include tag:
And the controller does not need to fill out what the site can be normal access:
The success of the separation, then the left here also has a navigation, and the content in each page is also displayed, then we casually will he also separated out good:
Then create a gps.html in the public directory to store:
Then you can solve the problem by following the same question:
The test results are fully displayed:
Kill Lei Dog---thinkphp----13 front-ends separation and navigation separation