The examples in this article describe the use of thinkphp special tags. Share to everyone for your reference. The specific analysis is as follows:
Special Label:
1. Comparison label
eq or Equal equals
NEQ or notequal is not equal to
GT Greater than
EGT is greater than or equal to
LT is less than
ELT is less than or equal to
HEQ constant equals
Nheq not constant equals
2. Range Label
In
Copy Code code as follows:
<in name= ' n ' value= ' 9,10,11,12 ' > in these numbers <else/> not within the range of these numbers </in>
<notin name= ' n ' value= ' 9,10,11,12 ' > in these numbers <else/> not within the range of these numbers </in>
Between
Copy Code code as follows:
<notbetween name= ' n ' value= ' 1,10 ' >{$n} between 1-10 <else/>{$n} is not between 1 and 10 </between>
3.present
Label to determine if the template variable has been assigned
Copy Code code as follows:
<present name= ' m ' >m is assigned a value <else/>m not assigned </present>
4.Empty
Empty label to determine if the template variable is empty
Copy Code code as follows:
<empty name= ' n ' >n for null assignment <else/>n value </empty>
5.Defined
To determine whether a constant has been defined
6.Define
Defining constants in a template
7.Assing
Variable assignment in a template
Other labels used:
1. Use PHP code directly in the template
Copy Code code as follows:
<php> echo "This is the cloud habitat community" </php>
2. Suggest changing the left and right delimiters
Change in configuration file
Copy Code code as follows:
' Tmpl_l_delim ' => ' <{',//modify left delimiter
' Tmpl_r_delim ' => '}> ',//Modify right delimiter
I hope this article will be helpful to everyone's thinkphp framework program design.