在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中应该怎么写(最重要的问题)?
{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
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28