Home > Article > Backend Development > TP5.1 How to use functions in view (code)
What this article brings to you is about the method (code) of using functions in the view in TP5.1. It has certain reference value. Friends in need can refer to it. , hope it helps you.
assign('email','1047588430@qq.com'); $this->assign('time',time()); $this->assign('user','cjk'); return $this->fetch(); } }
Use {$variable name|function} in the view
Document {$email} : {$email|md5}
{$email} : {$email|md5|strtoupper}
{$email} : {$email|substr=0,10}
Related recommendations:
code implementation of tp5 framework ajax asynchronously adding data
php implementation to generate mixed verification code and image verification code and test (code)
The above is the detailed content of TP5.1 How to use functions in view (code). For more information, please follow other related articles on the PHP Chinese website!