The source of the variable:
1 variables assigned from PHP, using assign Assignment
2 System Variables
3 Path Substitution variables
Cannot use variable of function
Variable output shortcut label
{@var}//output session variable and {$Think. Session.var} equivalent
{#var}//output cookie variable and {$Think. Cookie.var} equivalent
{&var}//Output configuration parameters and {$Think. Config.var} are equivalent
{%var}//Output language variable and {$Think. Lang.var} are equivalent
{. var}//output get variable and {$Think. Get.var} equivalent
{^var}//output post variable and {$Think. Post.var} equivalent
{*var}//output constants and {$Think. Const.var} are equivalent
{@var1. var2}//output $_session[' var1 '] [' var2 ']
{#var1. var2}//output $_cookie[' var1 '] [' var2 ']
One converted to uppercase {$title |strtoupper}
The function call format for the template variable is:
Copy Code code as follows:
{$varname |function1|function2=arg1,arg2,###}
Description
{and $ symbol can not have spaces between the following parameters of the space is no problem # # #表示模板变量本身的参数位置 support multiple functions, function support space support function, in the configuration file can be configured to prohibit the use of the list of functions to support the variable caching function, repeated variable string not multiple resolution
Use Example: X
Copy Code code as follows:
{$webTitle |md5|strtoupper|substr=0,3}