First, the project is structured as follows:
Added a public file, mainly managing common resources, compared to slices, styles, etc., unfold as follows
Subfolders image is responsible for managing Web page pictures, style folder is responsible for managing Css,javascript and other styles, upload folder is responsible for managing user upload content, admin and home represent backstage and foreground respectively.
The team folder is our project folder, which expands as follows
We mainly write the action under the Lib (Admin,home) and under the TPL (Admin,home), action is the business logic, TPL is the Web Template, admin and Home are backstage and the foreground;
To achieve the separation of front and rear, the config.php under config need to be configured as follows: (database partial Ignore, in the implementation of the database part of self-configuration)
It is important to note that TMPL_FILE_DEPR and Url_model are configuration path depth and route mode respectively, this reference thinkphp technical manual, after the configuration is completed to correctly parse
Below I wrote the foreground and backstage landing page, the file directory location is as follows:
The page works as follows:
It is relatively simple to do here, mainly to explain through the thinkphp implementation of the front and back of the file setup and configuration, the configuration after the completion of the reference Technical manual is able to quickly build a station.
Hope everybody refuels!
Jing Ke Thorn qin Wang ~
Thinkphp station-front and rear file configuration