|
{$smarty.now}變量用于訪問(wèn)當(dāng)前時(shí)間戳.
可以用 date_format調(diào)節(jié)器格式化輸出. 例如{$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
{$smarty.const}
你可以直接訪問(wèn)php常量. 例如{$smarty.const._MY_CONST_VAL}
{$smarty.capture}
可以通過(guò) {capture}..{/capture}結(jié)構(gòu) 截取的輸出可以使用{$smarty} 變量訪問(wèn).
{$smarty.config}
{$smarty}變量 可以訪問(wèn)已經(jīng)加載的config變量.
例如 {$smarty.config.foo}就可以表示 {#foo#}.
{$smarty.section}, {$smarty.foreach}
{$smarty} 變量可以訪問(wèn)'section'和'foreach'循環(huán)的屬性.
{$smarty.template}
顯示當(dāng)前被處理的模板的名字.
{$smarty.version}
顯示smarty模板的版本
{$smarty.ldelim}
顯示左分隔符
{$smarty.rdelim}
顯示右分隔符
php技術(shù):smarty的保留變量問(wèn)題,轉(zhuǎn)載需保留來(lái)源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。