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
找到"<body>"
用以下代码替换原来的调用头部代码
<?php pastertempletdiy("default/head.htm");?>
以上就是织梦dedecms留言板调用head.htm的详细内容。