在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中应该怎么写(最重要的问题)?
{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中应该怎么写(最重要的问题)?
{include file="header.html"}
都是成功的请玩过ecshop的高手解答
只是不知道ecshop团队不知道为什么要禁用这个方法!
难道是为了让大家不要去改变ecshop程序!
只能在模板那边下功夫吗?