织梦留言簿调用headerfooter.htm
第I.步:打开"/include/common.func.php",该文件V.
更多精彩就在: 51免费论文网|www.jxszl.com
VI版本以上默认存在,V.V的不存在自己建I.个.
然后在该文件中加入I.个函数,代码如下:
functionpasterTempletDiy($path)
{
require_once(DEDEINC."/arc.partview.class.php");
global$cfg_basedir,$cfg_templets_dir;
$tmpfile=$cfg_basedir.$cfg_templets_dir."/".$path;//模版文件的路径
$dtp=newPartView();
$dtp->SetTemplet($tmpfile);
$dtp->Display();
}
第II步,打开留言本的模版文件,默认的是/templets/plus/guestbook.htm
用以下代码替换原因的调用头部代码
pasterTempletDiy("default/header.htm");
?>
同理调用尾部代码
pasterTempletDiy("default/footer.htm");
?>
原文链接:http://www.jxszl.com/biancheng/dedecms/76437.html