smarttemplate在使用过程中,包含文件时,为什么只输出最后包含的文件?
以下是程序部分,header.php是解析header.htm模板以后return $tpl->result()的,footer.php是解析footer.htm模板以后return $tpl->result()的。
现象只输出,最后包含的文件内容。
//test.php
<?
require_once 'class.smarttemplate.php';
$tpl=new SmartTemplate('main.htm');
$tpl->assign('header',require_once('header.php'));
$tpl->assign('footer',require_once('footer.php'));
$tpl->output();
?>