亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

php smarty的預(yù)保留變量總結(jié)

 更新時間:2008年12月04日 13:29:28   作者:  
smarty的一個強(qiáng)大的優(yōu)點是在模板里可以直接使用smarty的預(yù)保留變量,省去了很多代碼,非常的方便。
以下是訪問頁面請求變量諸如get,post,cookies,server,enviroment和session變量的例子. 例如{$smarty.server.SERVER_NAME}取得服務(wù)器變量,{$smarty.env.PATH}取得系統(tǒng)環(huán)境變量path, {$smarty.request.username}取得get/post/cookies/server/env的復(fù)合變量。
{$smarty.now}變量用于訪問當(dāng)前時間戳.
可以用 date_format調(diào)節(jié)器格式化輸出. 例如{$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
{$smarty.const}
你可以直接訪問PHP常量. 例如{$smarty.const._MY_CONST_VAL}
{$smarty.capture}
可以通過 {capture}..{/capture}結(jié)構(gòu) 截取的輸出可以使用{$smarty} 變量訪問.
{$smarty.config}
{$smarty}變量 可以訪問已經(jīng)加載的config變量.
例如 {$smarty.config.foo}就可以表示 {#foo#}.
{$smarty.section}, {$smarty.foreach}
{$smarty} 變量可以訪問'section'和'foreach'循環(huán)的屬性.
{$smarty.template}
顯示當(dāng)前被處理的模板的名字.
{$smarty.version}
顯示smarty模板的版本
{$smarty.ldelim}
顯示左分隔符
{$smarty.rdelim}
顯示右分隔符

相關(guān)文章

最新評論