smarty配置
$this->assign('info',$info);//'info'是在视图模版中使用的,$info是我们上面定义好的.
设置smarty
- a 配置变量信息
- 1.convertion.php
- 2.Behavior行为配置变量信息(页面底部日志显示配置,smarty配置)
- 3.系统程序里边有一些零散的配置信息

复制到config.php中

- b具体使用(从TP引擎变为smarty引擎)
- 1.css样式如果有{},需要使用{literal}标签禁止smarty解析
- 2.关键字$Think变为$samrty
- 3.TP引擎会对关键常量进行替换
例如CONTROLLER,MODULE
smarty引擎不会替换,需要设置为:{$samrty.const.CONTROLLER}

网友评论