当前在线人工客服
天达云-技术
QQ:1324027256
天达云-技术
QQ:1902643386
天达云-售前
QQ:1650874901
天达云-售前
QQ:2207995833
天达云-合作
QQ:1984186903
天达云微信小程序
400-837-6568

smarty3.X新命名规范引起的'Call of unknown method'
更新:HHH   时间:2023-1-7


使用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

还是要用官方手册呀。。。



返回web开发教程...