ThinkPHP does not execute dynamic content after using includefile to introduce the template. what should I do?

Source: Internet
Author: User
ThinkPHP does not execute dynamic content after using includefile to introduce the template. what should I do?





Menu is an operation to extract data from the database to generate a menu,
I want to reference it on the homepage, After the introduction, only the data in the template can be loaded. it is not retrieved from the database. Which of the following methods can be used ?????


Reply to discussion (solution)

Read the database in advance and assign the content to be displayed to the variable.
Then set the tag for this variable in the template.

I removed $ this-> display () from this operation and executed this method in the _ initialize () method of the Index module, then, call the menu template in an operation template under the Index module, so that all operations on the menu will be executed as long as the method under the Index module is run. can this be done ??

Well, I'm taking this picture.

There is a problem with the import mechanism like thinkphp.

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.