Html display of TP framework

Source: Internet
Author: User
TP framework html display problem my website is TP framework, I use {$ v. the ue_accname} code can display the ue_accname value of the database, but I use {$ v. the ue_accname} code is blank. in what cases, do you want to set it in the controller?


Reply to discussion (solution)

We recommend that you read the TP development manual carefully.

You need to bind the variables to the template in the method in the controller so that the template can be used.

First, you must understand the page to which your $ v traversal is passed.

Is the page B content taken out? Are you assigned to the template?

Have you obtained the value in the method on page B?

We recommend that you read the TP development manual carefully.

What is the specific directory?

You need to bind the variables to the template in the method in the controller so that the template can be used.

How can I perform this operation?

First, you must understand the page to which your $ v traversal is passed.

Where can I view the page to which it is sent?

A and B are two independent pages (programs). A's controller reads the database, but obviously B does not have all print null values.

Your controller only loads the template page. if the B template page is not loaded, it is certainly blank. To display it, it is very easy to write a method in the controller and send the variable to the B Template page again.

Your controller only loads the template page. if the B template page is not loaded, it is certainly blank. To display it, it is very easy to write a method in the controller and send the variable to the B Template page again.

How to write?

A and B are two independent pages (programs). A's controller reads the database, but obviously B does not have all print null values.

Page B must have read the database, because page B also has {$ v. g_user} is A variable that can be used on page A {$ v. the ue_accname} code displays the database. I cannot directly copy it to the B page. in this case, can you tell me how to write the code?

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.