The present label of the thinkphp template is used to
determine if a template variable has been assigned a value。
The present tag of the thinkphp template engine is used to determine if the template variable has been assigned, and is equivalent to the isset () function behavior in PHP, in the following format:
The content to output
Examples of usage are as follows:
{$username} Hello!
This example is equivalent to:
if (Isset ($username)) { echo "$username Hello! ";}
In addition, the judgment is not assigned can be used notpresent tag, the following usage:
Username not exist live not logged in
You can also combine the above two tags into:
{$username} Hello!
username not exist live not logged in
http://www.bkjia.com/PHPjc/824721.html www.bkjia.com true http://www.bkjia.com/PHPjc/824721.html techarticle the present label of the thinkphp template is used to determine whether the template variable has already been assigned a value. The present tag of the thinkphp template engine is used to determine if the template variable has been assigned a function equivalent to the ph ...