注:由于水平有限,欢迎指正.转载请务必注明出处. 1 include Attribute Name Type Required Default 描述 file string Yes n/a The name of the template file to include assign string No n/a The name of the variable that the output of include will be assigned to [var ...] [var ty…
smarty基本语法: 1.注释:<{* this is a comment *}>,注意左右分隔符的写法,要和自己定义的一致. <{* I am a Smarty comment, I don't exist in the compiled output *}><!--里面的内容是注释的,不会显示在页面中--> 2.变量:模板变量用美元符号$开始,可以包含数字.字母和下划线,这与php变量很像.可以引用数组的数字或非数字索引,当然也可以引用对象属性和方法. <{…