smarty3.X新命名规范引起的'Call of unknown method'
使用smaty时需要检测模板是否存在。
查手册有
函数,使用后毫无效果。。。template_exists
错误日志,
“Smarty: Call of unknown method 'template_exists'”
上网找了一下,原来smarty3.X以后,方法的命名规范变了,采用驼峰式的命名方式,如 fooBarBaz,所以检测模板的函数是“templateExists()”。
http://www.smarty.net/docs/zh_CN/api.template.exists.tpl
还是要用官方手册呀。。。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。