#4 jake
原来你的意思是自建模板引擎怎么嵌进去用对吧。
可以参考speedy.php的写法,也就是speedy用的就是标准的接口,一定要有的接口(成员函数和变量)是:
template_dir变量 public 代表模板目录
assign($key, $value = null) 设值到模板
templateExists($tplname) 判断模板是否存在
registerPlugin() 要有这函数,但不一定使用。用于类似smarty的注册函数
display($tplname) 显示函数
上面说的成员函数都要名称对才行。
2013-01-08 08:13:55