©
이 문서에서는PHP 중국어 웹사이트 매뉴얼풀어 주다
Smarty - the compiling PHP template engine | ||
---|---|---|
Prev 来源:PHP中文社区 | 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.来调用(下节将讲到)
第二种语法在变量作为属性值并被引号括住的时候非常有用.
(译注:举个例子 {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}. 的章节里说明.
Prev 来源:PHP中文社区 | Home | Next |
Variables [变量] |
Up | {$smarty} reserved variable [{$smarty} 保留变量] |