用标签啊,然后用函数替换
<{title}>
<{time}>
之类的

解决方案 »

  1.   

    一般不推荐多个文件处理多个模板,很容易搞混。
    把所有模板加载进来,比如smrty里:
    {* include.html *}
    {include file="header.html"}
    {include file="left.html"}
    {include file="content"}
    {include file="foot.html"}这样就把所有的模板都加载倒一个页里了,相当于就是一个模板,然后使用程序来解析://index.php
    $tpl->assign("xxx", $xxx);
    $tpl->assign("yyy", $yyy);
    $tpl->display("index.html");在index.php里对所有的模板变量进行解析就能够解决了
      

  2.   

    index.php
    $smarty->display(SMARTY_TEMPLATE_DIR . "sales/index.tpl");
    index.tpl就是你用html生成的模板