POST TIME:2021-05-24 02:58
function pasterTempletDiy($path)
{
require_once(DEDEINC."/arc.partview.class.php");
global $cfg_basedir,$cfg_templets_dir;
$tmpfile = $cfg_basedir.$cfg_templets_dir."/".$path;//模版文件的路徑
$dtp = new PartView();
$dtp->SetTemplet($tmpfile);
$dtp->Display();
}
第二步,打開(kāi)留言本或者問(wèn)答的模版文件,默認(rèn)的是/templets/plus/guestbook.htm或者/ask/templates/default,在其后,加入如下代碼:
<?php
pasterTempletDiy("default/head.htm");
?>
代碼就和其他模版調(diào)用的方法一樣了。 