Thinkphp framework template variables and template output
Thinkphp framework
Template operation variable output:
{:function(…)} //执行方法并输出返回值
{~function} //执行方法不输出
{@var} //输出Session变量
{#var} //输出Cookie变量
{&var} //输出配置参数
{%var} //输出语言变量
{.var} //输出GET变量
{^var} //输出POST变量
{*var} //输出常量
Copy after login
Template output
//1 Directly call the default (index) operation template
$this->display();
// Corresponds to Winxin/Tpl/default/Index/index.html
//2 Call the test1 operation template of the Index module
$this->display('test1');
//Corresponds to Winxin/Tpl/default/Index/test1.html
//2 Call the mes operation template() of the Message module
$this->display('Message:mes');
//Corresponds to Weixin/Tpl/default/Message/mes.html
//3 Call the test2 operation template of the Message module of the XP theme
$this->display('Xp@Message:test2');
//Corresponds to Weixin/Tpl/Xp/Message/test2.html
//4 Directly specify the full name of the template file
$this->display('../Message/test3.html');
//corresponds to Myapp/Tpl/default/Message/test3.html
http://www.bkjia.com/PHPjc/1061537.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1061537.htmlTechArticleThinkphp framework template variables and template output Thinkphp framework template operation variable output: {:function()} //Execution method And output the return value {~function} //The execution method does not output {@var} //Output...