此处以{}作为定界符为例:
{$smarty.get.参数名}{$smarty.post.参数名}//request可以获取get或post的值。
{$smarty.request.参数名}{$smarty.session.参数名}{$smarty.cookies.参数名}{$smarty.server.参数名}{$参数名|date_format:'%Y-%m-%d %H:%M:%S'}{$参数名|lower}{$参数名|upper}{$参数名|capitalize}{$参数名|cat:'字符串'}{$参数名|default:'字符串'}{$参数名|truncate:23:"...":true}{$参数名|escape:html}{$参数名|escape:url}{$参数名|regex_replace:"/字符串1/":"字符串2"}{$参数名|replace:"字符串1":"字符串2"}{$参数名|string_format:"%.2f"}{$参数名|string_format:"%d"}(1)修改定界符设成 <{ }>
(2)可以把JS代码包含在{literal} {/literal}之间
共 0 条评论