+ -
当前位置:首页 → 问答吧 → 在ecshop模板中,include file的问题?

在ecshop模板中,include file的问题?

时间:2011-12-01

来源:互联网

在ecshop模板中,
{include file="header.tpl"}
这个是正确的,能加载header.tpl到页面中

可是如果是变量,就失败了
{include file=$filename}
会提示:Parse error: syntax error, unexpected T_STRING in C:\wamp\www\ecshop\upload\includes\cls_template.php(1161) : eval()'d code on line 1
当然,我有在php页中加入:
$filename="header.tpl";
$smarty->assign('filename',$filename); 

下面是我的问题:
1.在smarty模板中这样写({include file=$filename})是正确的,为什么在ecshop就是错误的?
2.ecshop的smarty与smarty模板区别多大?
3.那在ecshop中应该怎么写(最重要的问题)?

作者: tianxiahui222   发布时间: 2011-12-01

{include file=$filename}这个好像只能引入js文件吧

作者: yao970953039   发布时间: 2011-12-01

相关阅读 更多