使用smarty编译product.tpl时出错 [英] Error in compiling product.tpl using smarty
问题描述
我尝试使用smarty编译此 tpl文件。我的php档案是这。但是我正在显示错误消息
I have tried to compile the this tpl file using smarty. My php file is this. But I am being shown the error message
(!)致命错误:未捕获 - > Smarty编译器:模板中的语法错误 \\ templates \product.tplon line 94var doesntExist ='{ls ='此组合不存在此产品,请选择另一个。'js = 1}';未知标记l< - 抛出在第94行的C:\wamp\www\Smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php中
( ! ) Fatal error: Uncaught --> Smarty Compiler: Syntax error in template ".\templates\product.tpl" on line 94 "var doesntExist = '{l s='This combination does not exist for this product. Please choose another.' js=1}';" unknown tag "l" <-- thrown in C:\wamp\www\Smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 94
任何人都可以帮我解决这个错误吗?
Can anyone please help me how to fix this error?
推荐答案
var doesntExist = '{l s='This combination does not exist for this product. Please choose another.' js=1}';
$ b <是Smarty的功能吗?如果是,它似乎没有正确加载,如果它应该是纯文本从某种原因,你可以尝试把它放入 {literal}
:
var doesntExist = '{literal}{l s='This combination does not exist for this product. Please choose another.' js=1}{/literal}';
这篇关于使用smarty编译product.tpl时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!