?
This document uses PHP Chinese website manual Release
Smarty - the compiling PHP template engine | ||
---|---|---|
Prev 來源:PHP中文社區(qū) | Chapter 4. Variables[第四章.變量] | Next |
Variables that are loaded from the config files are referenced by enclosing
them within hash marks (#), or with the smarty variable $smarty.config.
The second syntax is useful for embedding into quoted attribute values.
配置文件中的變量需要通過用兩個"#"或者是smarty的保留變量 $smarty.config.來調(diào)用(下節(jié)將講到)
第二種語法在變量作為屬性值并被引號括住的時候非常有用.
(譯注:舉個例子
{include file="#includefile#"} 這樣#includefile#將被當作字符處理,而不表示配置文件變量,
但可以這樣表示 {include file="`$smarty.config.includefile`"}不要忘了加``)
Example 4-5. config variables
|
Config file variables cannot be used until after they are loaded in from a config file. This procedure is explained later in this document under {config_load} .
配置文件的變量只有在它們被加載以后才能使用.
這個過程將在以后
{config_load}
. 的章節(jié)里說明.
Prev 來源:PHP中文社區(qū) | Home | Next |
Variables [變量] |
Up | {$smarty} reserved variable [{$smarty} 保留變量] |