<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

dedecms关键词维护里面字数多的词优先字数少的词的解决办法

时间:2020-12-15

织梦后台的关键词维护默认的情况是字数少的词优先于字数多的词,比如我们有两个这样的词:创业、创业方向,第二个词包含了第一个词,在文章中如果出现“创业方向”这个词,默认情况下只会给创业两个字添加关键词超链接,而不是整个词,那么我们怎么样才能实现字数多的词优先于字数少的词呢?下面就告诉大家具体的解决方法:


我们找到并打开/include/arc.archives.class.php文件,在里面找到如下代码:

01 function ReplaceKeyword($kw,&$body)
02     {
03         global $cfg_cmspath;
04         $maxkey = 5;
05         $kws = explode(",",trim($kw));    //以分好为间隔符
06         $i=0;
07         $karr = $kaarr = $GLOBALS['replaced'] = array();
08  
09         //暂时屏蔽超链接
10         $body = preg_replace("#(<a(.*))(>)(.*)(<)(\/a>)#isU"'\\1-]-\\4-[-\\6', $body);
11  
12         /*
0