織夢Dedecms留言板調用head.htm

織夢Dedecms留言板調用head.htm

dedecms留言板 頭部調用 修改方法:

第一步:我們需要打開”/include/common.func.php”,這個文件5.6版本默認存在,5.5的不存在我們可以建一個,這個文件功能是用來解析模版的? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(推薦學習:織夢cms

也可以打開”include/extend.func.php”文件。

在該文件中加入一個函數,代碼如下:

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(); }

第二步,打開留言本的模版文件,默認的是/templets/plus/guestbook.htm

找到”

用以下代碼替換原來的調用頭部代碼

<?php   pasterTempletDiy("default/head.htm"); ?>

? 版權聲明
THE END
喜歡就支持一下吧
點贊8 分享