鍍金池/ 教程/ PHP/ Smarty屬性
Smarty安裝
Smarty insert
Smarty 建立緩存
Smarty調(diào)試控制臺
Smarty if,elseif,else
Smarty include_php
Smarty多個緩存
Smarty方法
Smarty section,sectionelse
Smarty注釋代碼
Smarty屬性
Smarty緩沖處理函數(shù)
Smarty變量調(diào)節(jié)器
Smarty函數(shù)
Smarty組合修改器
Smarty雙引號里值的嵌入
Smarty預(yù)過濾器
Smarty foreach,foreachelse
Smarty include
Smarty Caching緩存
Smarty變量
Smarty assign用法
Smarty控制插件輸出緩沖
Smarty從配置文件讀取的變量
Smarty對象
Smarty literal
Smarty緩存集合
Smarty教程
Smarty display方法
Smarty自定義函數(shù)
Smarty配置文件
Smarty擴展設(shè)置
Smarty數(shù)學(xué)運算
Smarty輸出濾鏡
Smarty fetch方法

Smarty屬性

Attributes

[屬性]

大多數(shù)函數(shù)都帶有自己的屬性以便于明確說明或者修改他們的行為. 
smarty函數(shù)的屬性很像HTML中的屬性. 
靜態(tài)數(shù)值不需要加引號,但是字符串建議使用引號. 
如果用變量作屬性,它們也不能加引號.

一些屬性用到了布爾值(真或假).
它們不需要加引號,可以是true,on,yes或者false,off,no.


例 3-3.函數(shù)屬性語法

{include file="header.tpl"}

{include file=$includeFile}

{include file=#includeFile#}

{html_select_date display_days=yes}

<SELECT name=company>
{html_options values=$vals selected=$selected output=$output}
</SELECT>