将TP引擎改为smarty引擎

在common/config文件里设置'TMPL_ENGINE_TYPE'=>'Smarty'即可,但要注意,在模板文件里的css样式{}要用一对{literal}{/literal}标签包裹,禁止smarty引擎解析。所有$Think改为$smarty,还有tp引擎可以直接用__MODULE__常量,smarty要用{$smarty.const.__MODULE__}访问

原文地址:https://www.cnblogs.com/toward-the-sun/p/4036226.html