Smarty注釋代碼

所有的smarty範本標籤都被加上了定界符.
默認情況下是 { 和},但它們是可被改變的.

例如,我們假定你在使用默認定界符.
smarty裏,所有定界符以外的內容都是靜態輸出的,或者稱之為不可改變.
當smarty遇到了範本標籤,將嘗試解釋他們,然後再以恰當的方式輸出 .

Comments[注釋]

範本注釋被*號包圍,例如 {* this is a comment *} 
smarty注釋不會在範本檔的最後輸出中出現.
它只是範本內在的注釋.


例 3-1.注釋

{* Smarty *}

{* include the header file here *}
{include file="header.tpl"}

{include file=$includeFile}

{include file=#includeFile#}

{* display dropdown lists *}
<SELECT name=company>
{html_options values=$vals selected=$selected output=$output}
</SELECT>


上一篇: Smarty擴展設置 下一篇: Smarty函數