This article mainly introduces how to use the functions in the thinkPHP template, and compares and analyzes the use of php functions separately with the corresponding use of php functions in the thinkPHP template in the form of examples, for more information about how to use functions in the thinkPHP template, see the examples in this article. We will share this with you for your reference. The details are as follows:
1. use methods in php
<? Php $ var_num = "13966778888"; $ str = substr_replace ($ var_num, '*****',); echo $ str; $ var_date = time (); $ str = date ("Y-m-d H: I", $ var_date); echo $ str;?>
2. use in the template
{Sh: $ member. tel | substr_replace = "*****", 3,5} {sh: $ member. addtime | date = "Y-m-d H: I ",###}
If the variable is the first parameter, ### is not required ###.
If it is not the first, use ### to mark the location.