Home > Backend Development > PHP Tutorial > smarty retained variable problem_PHP tutorial

smarty retained variable problem_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:49:13
Original
914 people have browsed it

The following is an example of accessing page request variables such as get, post, cookies, server, environment and session variables. For example, {$smarty.server.SERVER_NAME} obtains server variables, {$smarty.env.PATH} obtains system environment variables path, { $smarty.request.username} obtains the composite variable of get/post/cookies/server/env.
The {$smarty.now} variable is used to access the current timestamp.
You can use the date_format adjuster to format the output. 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 access them through { The output captured by the capture}..{/capture} structure can be accessed using the {$smarty} variable.
 {$smarty.config}
 The {$smarty} variable can access the loaded config variable.
For example {$smarty.config.foo} can represent {#foo#}.
 {$smarty.section}, {$smarty.foreach}
 {$smarty} variables can access 'section' and 'foreach' Loop attributes.
{$smarty.template}
Displays the name of the currently processed template.
{$smarty.version}
Displays the smarty template version
{$smarty.ldelim }
Show left delimiter
{$smarty.rdelim}
Show right delimiter

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319616.htmlTechArticleThe following are examples of accessing page request variables such as get, post, cookies, server, environment and session variables. For example { $smarty.server.SERVER_NAME} gets the server variables, {$smarty.env.PATH} gets the system...
Statement of this Website
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
Latest Issues
smarty turns on caching garbled characters
From 1970-01-01 08:00:00
0
0
0
Why does tp use smarty template? ?
From 1970-01-01 08:00:00
0
0
0
How do you use smarty to integrate laravel5?
From 1970-01-01 08:00:00
0
0
0
Two ways to install smarty
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template