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