Chinaunix首页 | 论坛 | 博客
  • 博客访问: 313224
  • 博文数量: 128
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1611
  • 用 户 组: 普通用户
  • 注册时间: 2013-08-19 11:49
文章分类

全部博文(128)

文章存档

2018年(2)

2016年(2)

2014年(10)

2013年(114)

我的朋友

分类: Java

2013-09-11 10:54:51

当输入url地址后网页出现: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定界符冲突导致的。

1.可以把 smarty 的定界符设成 <{ }>

点击(此处)折叠或打开

  1. $tpl->left_delimiter = '<{';
  2. $tpl->right_delimiter = '}>'
2.对于js的{}与smarty定界符冲突,可以用smarty的literal处理,可以把JS代码包含在{literal}{/literal}之间就可以了。
转自

点击(此处)折叠或打开

  1. <{literal}>
  2. $ (
  3. <span style="white-space:pre"> </span>function () { alert ('培训课程')}
  4. );
  5. <{/literal}>


阅读(986) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~