Thinkphp _ template operation
|
Quick output variable
- {: Function (...)} // Execute the method and output the returned value
- {~ Function} // the execution method is not output
- {@ Var} // output the Session variable
- {# Var} // output Cookie variable
- {& Var} // output configuration parameters
- {% Var} // output language variable
- {. Var} // output GET variable
- {^ Var} // output the POST variable
- {* Var} // output constant
Template output
- // 1 directly call the index operation Template
- $ This-> display ();
- // Corresponding to Myapp/Tpl/default/Index/index.html
- // 2 call the test1 operation template of the Index module
- $ This-> display ('test1 ');
- // Corresponding to Myapp/Tpl/default/Index/test1.html
- // 2 call the test2 operation template of the Message module ()
- $ This-> display ('Message: test2 ');
- // Corresponding to Myapp/Tpl/default/Message/test2.html
- // 3 call the test2 operation template of the Message module of the XP topic
- $ This-> display ('XP @ Message: test2 ');
- // Corresponding to Myapp/Tpl/Xp/Message/test2.html
- // 4 specify the full name of the template file.
- $ This-> display ('../Message/test3.html ');
- // Corresponding to Myapp/Tpl/default/Message/test3.html
|