Home  >  Article  >  Backend Development  >  TP5.1 How to use functions in view (code)

TP5.1 How to use functions in view (code)

不言
不言Original
2018-08-20 16:48:567001browse


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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn