smarty3.0.7官网下载的demo运行报错 /*%%SmartyNocache:221334da460b2356f10-15165135%%*//*/% 解决方法(转)

来源:互联网 发布:10月经济数据点评 编辑:程序博客网 时间:2024/06/04 19:43

转自:http://hi.baidu.com/lentimchen/blog/item/ea03df8032bc33cebd3e1eee.html

smarty3.0.7官网下载的demo运行报错的解决方法
2011-04-12 22:39
从官网下载的smarty3.0.7版本运行,直接报如下错误:

/*%%SmartyNocache:221334da460b2356f10-15165135%%*//*/%%SmartyNocache:221334da460b2356f10-15165135%%*/
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "./templates/header.tpl" on line 3 "{popup_init src="/javascripts/overlib.js"}" unknown tag "popup_init"' in D:/cvsroot/tuan/Smarty3_07/libs/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 D:/cvsroot/tuan/Smarty3_07/libs/sysplugins/smarty_internal_templatecompilerbase.php(253): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown tag "po...', 3) #1 D:/cvsroot/tuan/Smarty3_07/libs/sysplugins/smarty_internal_templateparser.php(2319): Smarty_Internal_TemplateCompilerBase->compileTag('popup_init', Array) #2 D:/cvsroot/tuan/Smarty3_07/libs/sysplugins/smarty_internal_templateparser.php(2812): Smarty_Internal_Templateparser->yy_r35() #3 D:/cvsroot/tuan/Smarty3_07/libs/sysplugins/smarty_internal_templateparser.php(2912): Smarty_Internal_Templateparser->yy_reduce(35) #4 D:/cvsroot/tuan/Smarty3_07/libs/sysplugins/smarty_internal_smartytemplatecompiler.php(51): Smarty_Internal_Templatep in D:/cvsroot/tuan/Smarty3_07/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 431

看提示是没有找到popup_int标签。

解决方式一:找到 /templates/header.tpl 文件,删除掉{popup_init src="/javascripts/overlib.js"},运行OK。

方式二:产生上述错误的真正原因是没有找到popup_int这个插件函数,有跟上一个版本比较了下,发现plugins文件夹里面还真不存在function.popup_int.php、function.popup.php找个两个函数,直接COPY,运行一起OK。