机器装的是appser  我在做网站时...想在静态页中引用其它html页...
我看了一些系统,比如页脚...只写{include file=footer.html}
就引进来..了...我想知道..怎么实现这样的功能...我用smarty板的...
昨晚找了半天也没找到...请高 人指点呐...如何配置..才可以样..引用..

解决方案 »

  1.   

    {include file=footer.html}是引入其他模板,你要引入静态页,那就把那个静态页做成模板,放在默认的smarty模板目录下就可以了
      

  2.   

    $tpl->parse('header',"header.html");
    //parse函数是页面嵌套函数,header变量就可以在index里使用
                    $tpl->display($index); //index.tpl下面的函数加到smarty.class.php里
        /** 
    * 模板嵌套的方法 
    * @param unknown_type $tpl_var 
    * @param unknown_type $resource_name 
    * @author VioletElegy 
    */ 
    function parse($tpl_var, $resource_name) 

    $this->_tpl_vars[$tpl_var] = $this->fetch($resource_name); 
      

  3.   

    我用了smarty 3.0...直接就可以了..