欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

解決css和js的{}與smarty定界符沖突問題的兩種方法

 更新時間:2013年09月10日 17:28:50   作者:  
當(dāng)輸入url地址后網(wǎng)頁出現(xiàn)如下文所描述的問題通常是css和js的{}與smarty定界符沖突導(dǎo)致的,解決方法有兩個,具體如下,感興趣的朋友可以參考下
當(dāng)輸入url地址后網(wǎng)頁出現(xiàn):Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "E:\wamp\www\cms\system/templates/index.html" on line 79 "$("#job").load("./system/templates/touch/test.php",{catid:3});" - Unexpected ":", expected one of: "}" , " "' in E:\wamp\www\cms\system\Smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 441這樣的問題,通常是css和js的{}與smarty定界符沖突導(dǎo)致的。

解決辦法有兩個:

1.可以把 smarty 的定界符設(shè)成 <{ }>
復(fù)制代碼 代碼如下:

$tpl->left_delimiter = '<{';
$tpl->right_delimiter = '}>';

2.對于js的{}與smarty定界符沖突,可以用smarty的literal處理,可以把JS代碼包含在{literal}{/literal}之間就可以了。
復(fù)制代碼 代碼如下:

<{literal}>
$ (
<span style="white-space:pre"> </span>function () { alert ('培訓(xùn)課程')}
);
<{/literal}>

相關(guān)文章

最新評論