?>[/code:1:b920254608]
模板(template.html): 占位符(PLACEHOLDER)对应数组,“.”对应数组“[]”
[code:1:b920254608]<html> German TLD: {top_level_domain.world.europe.germany} </html>[/code:1:b920254608]
输入:
[code:1:b920254608]<html> German TLD: DE </html>[/code:1:b920254608]
语法以下:
变量不为空
[code:1:a8dfa966b1]<!-- IF var --> var 不为空! <!-- ENDIF var -->[/code:1:a8dfa966b1]
变量值判别
[code:1:a8dfa966b1]<!-- IF name=="HonestQiao" --> Your name is HonestQiao! <!-- ENDIF name -->[/code:1:a8dfa966b1]
变量值否认判别
[code:1:a8dfa966b1]<!-- IF name!=" HonestQiao " --> Your name is not HonestQiao! <!-- ENDIF name --> [/code:1:a8dfa966b1]
HonestQiao 答复于:2005-08-18 11:48:17 [color=darkblue:057f14a0b1][size=18:057f14a0b1]SmartPHP 例子: begin end[/size:057f14a0b1][/color:057f14a0b1]
[b:057f14a0b1]begin ... end[/b:057f14a0b1] 布局供应了一种办法,利用数字索引数组来输入反复的类似的内容。数字索引数组的每个元素,应当是一个散列数组,<!-- begin --> and <!-- end --> 标签相似一个小的模板,他剖析内嵌的模板片段,并利用这个散列数组来生成内容。