TP Frame HTML Display problem

Source: Internet
Author: User
My site is the TP framework, I use {$v. Ue_accname} code on the A-page HTML to display the Ue_accname value of the database, but I use {$v. Ue_accname} in the B-page HTML. The code is blank, what situation is to enter the controller inside the settings?


Reply to discussion (solution)

I suggest you read the development Manual of TP first.

Need the method inside the controller, bind the variable to the template, the template can be used.

You first need to understand which page your traversal $v is passed to.

B did you get the content out of the page? Are you assigned to the template?

b page method inside do you get the value?

I suggest you read the development Manual of TP first.

What's the exact directory?

Need the method inside the controller, bind the variable to the template, the template can be used.

How does it work?

You first need to understand which page your traversal $v is passed to.

Where to see which page to pass

A and B are 2 separate pages (Programs), A's controller reads the database, but obviously B does not have all the print null values

Your controller only loads the A-template page, does not load the B-Template page, and definitely shows a blank. To show, it is very simple, the controller is writing a method, send the variable again to the B template page can be displayed.

Your controller only loads the A-template page, does not load the B-Template page, and definitely shows a blank. To show, it is very simple, the controller is writing a method, send the variable again to the B template page can be displayed.

How do you write it?

A and B are 2 separate pages (Programs), A's controller reads the database, but obviously B does not have all the print null values

b page must also read the database, because B page also useful {$v. g_user} This variable, but the original on the A page can be used {$v. Ue_accname} code to display the database, I directly copied to the B page will not show, is such a situation, can say specifically how to write, code
  • Related Article

    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.