看一看这个模板类的用法!
echo $tpl -> parse("add.htm");
问题应该在这个上面!

解决方案 »

  1.   

    http://blog.csdn.net/arcow/archive/2004/10/16/139250.aspx这个有详细说明及源代码打包
      

  2.   

    楼主类模板不是这样的用法吧?你是用哪个类模板啊?PHPLib?还是SMARTY?
    如果是PHPLib,就应该这样类似的用法:
    $template = new Template("./templates","keep"); 
    $template->set_file("msgedit","msgEdit.htm");
    $template->set_var("sort_name",$db->f("sort_name"));
    $template->set_var("sort_id",$db->f("sort_id"));
    $template->parse("out", "msgedit"); 
    $template->p("out");