The following are examples of accessing page request variables such as get,post,cookies,server,enviroment and session variables. For example {$smarty. server.server_name} Gets the server variable, {$smarty. Env.path} Gets the system environment variable PATH, {$smarty. Request.username} gets get/post/ The compound variable of the cookies/server/env.
{$smarty. Now} variable is used to access the current timestamp.
The output can be formatted with the Date_format regulator. For example {$smarty. Now|date_format: "%y-%m-%d%h:%m:%s"}
{$smarty. Const}
You can access PHP constants directly. For example {$smarty. Const._my_const_val}
{$smarty. Capture}
You can pass {capture}. The output of the {/CAPTURE} structure interception can be accessed using the {$smarty} variable.
{$smarty. config}
The {$smarty} variable can access the config variable that has already been loaded.
For example {$smarty. Config.foo} can represent {#foo #}.
{$smarty. Section}, {$smarty. foreach}
{$smarty} variables can access the properties of the ' section ' and ' foreach ' loops.
{$smarty. Template}
Displays the name of the template that is currently being processed.
{$smarty. Version}
Displays the version of the Smarty template
{$smarty. Ldelim}
Show left delimiter
{$smarty. Rdelim}
Show Right delimiter
http://www.bkjia.com/PHPjc/319722.html www.bkjia.com true http://www.bkjia.com/PHPjc/319722.html techarticle The following are examples of accessing page request variables such as get,post,cookies,server,enviroment and session variables. {$smarty. Server.server_name} Gets the server variable, {$ Smarty.env.PATH} Get the System ...