Thinkphp station-front and rear file configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.