smarty模版的header里怎么显示数据?

-----------index.php----------------$smarty=newSmarty;$smarty->assign('hello',"hellow... -----------index.php----------------
$smarty = new Smarty;
$smarty->assign('hello',"hello world");

$smarty->assign('header',"header show list ...."); //header

$smarty->display('index.html');
---------------------------------------

-----------header.html---------------- 在这个html中怎么显示{$header}? 写header.php 试过了。 但是这样还是无法显示 因为用include() 无法打开header.php 所以header.php 中的代码不能运行?
{include file="header.html" title=foo}

{$header}

{include file="footer.html"}
---------------------------------------

-----------index.html----------------
{include file="header.html" title=foo}

{$hello}

{include file="footer.html"}
---------------------------------------

该怎么办? 大家帮我一个忙!!、、、
-----------header.html---------------- 在这个html中怎么显示{$header}? 写header.php 试过了。 但是这样还是无法显示 因为用include() 无法打开header.php 所以header.php 中的代码不能运行?

{$header}

---------------------------------------
展开
 我来答
dahuasd
2013-07-17
知道答主
回答量:12
采纳率:0%
帮助的人:11.3万
展开全部
明明引用的是header.html,你找到那个文件看看里面的代码
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式