Smarty常用代码

2012-06-07

1
2
{foreach from=$items item=item key=i name=name}
{/foreach}
{$title|escape}
{$datetime|date_format:'%Y-%m-%d %H:%M:%S'}
{$title|@substr:7:-1}
{$title|@strpos:"/" === false}
{$title|@trim}
{$url|@simplexml_load_file}
{$xml|@simplexml_load_string}
{$title|@mb_strimwidth:0:10:"":"utf-8"}
{$title|default:""}
1
2
{if $smarty.now>('2012-09-11 00:00:00'|@strtotime)}
{/if}
{$title|@json_encode}
{$smarty.const.DATE_RSS|date:$smarty.now}

s@zhso.netPay