thinkphp frame template variables and template output

Source: Internet
Author: User

thinkphp Frame

template action variable output:
{: function (...)} Executes the method and outputs the return value
{~function}//execution method does not output
{@var}//Output session variable
{#var}//Output cookie variable
{&var}//Output configuration parameters
{%var}//Output language variable
{. var}//Output get variable
{^var}//Output post variable
{*var}//Output constant

Template Output
1 Call the default (Index) action template directly
$this->display ();
Correspondence winxin/tpl/default/index/index.html

2 Calling the Test1 action template of the index module
$this->display (' test1 ');
Correspondence winxin/tpl/default/index/test1.html

2 MES action template calling the Message module ()
$this->display (' message:mes ');
Correspondence weixin/tpl/default/message/mes.html

3 Test2 action template for the message module that calls the XP topic
$this->display (' [email protected]:test2 ');
Correspondence weixin/tpl/xp/message/test2.html

4 directly specify the full name of the template file
$this->display ('.. /message/test3.html ');
Correspondence myapp/tpl/default/message/test3.html

This article is from the "Ouyangjun" blog, make sure to keep this source http://ouyangjun.blog.51cto.com/10284323/1703553

thinkphp frame template variables and template output

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.