[CODE:] #add.php #add.tpl #Menu.php #Menu.tpl
require_once('./Path.Setting.php');
require_once('./Setting.Inc.php');
require_once(QuiZ_Path.'../Classes/FileName_Set.php');
$link = new ExecSQL(); #SQL操作
$menu = new Menu_Class(); #菜单生成
$link -> SetSQL("Select * From ".Base::$Menu_Left." order by path");
$menu -> Set_Array($link -> Query_array());
$Smarty -> assign('menu_select',$menu -> Menu_Select());
$Smarty -> display('add.tpl');
?>
?
{$css}" rel="stylesheet" type="text/css" />
{include_php file="./Menu.php"}
?>
require_once('./Path.Setting.php');
require_once('./Setting.Inc.php');
require_once(QuiZ_Path.'../Classes/FileName_Set.php');
$link = new ExecSQL();
$menu = new Menu_Class();
$link -> SetSQL("Select * From ".Base::$Menu_Left." order by path");
$menu -> Set_Array($link -> Query_array());
$abc = $menu -> Menu_Output();
$this -> assign('menu',$abc);
$this -> display('Menu.tpl');
?>
{$menu}
?>
add.php中按正常使用SMARTY模板add.tpl → 模板中使用{include_php file="./Menu.php"}
Menu.php中使用$this来解释执行Menu.tpl
这样就可以正常使用include_php来包含文件了.