<legend id='1ilx3czl'><style id='vfzbj1o6'><dir id='q8vu4rya'><q id='ir9xpi2x'></q></dir></style></legend>

    1. <small id='gm0civ3w'></small><noframes id='ksxahtdx'>

    2. <i id='y5gwhxe7'><tr id='vegmvilw'><dt id='dguklnxu'><q id='at69boxt'><span id='hf0gn3k1'><b id='p9koe9qb'><form id='9l5vmunn'><ins id='odrlftsx'></ins><ul id='u63s7tux'></ul><sub id='zau7bigj'></sub></form><legend id='2u5kuygu'></legend><bdo id='9imljthv'><pre id='yyb5r3eh'><center id='nzibsdf6'></center></pre></bdo></b><th id='pevoegjy'></th></span></q></dt></tr></i><div id='xjccwu22'><tfoot id='74sxjytr'></tfoot><dl id='nlcqy6bh'><fieldset id='xg7ps0ft'></fieldset></dl></div>

      • <bdo id='vtsybuxa'></bdo><ul id='kflh0ems'></ul>
    3. <tfoot id='qvrn1q86'></tfoot>

      精准传达 • 价值共享

      洞悉互联网前沿资讯,探寻网站营销规律

      织梦DedeCMS关键词自动内链php5.5以上失效问题解决方法

      作者: 庚午网络 | 2021-01-17 01:54 |点击:

      DEDECMS 关键词 php5.5

    4. <i id='d4zt9mro'><tr id='lxntvv1x'><dt id='kuq5s0qi'><q id='5pod9wac'><span id='xrfchfjd'><b id='2zqgilqh'><form id='699r0m5g'><ins id='o22e9kxb'></ins><ul id='5hh67mng'></ul><sub id='a0po8bpu'></sub></form><legend id='14i4adfv'></legend><bdo id='1ci8e1r1'><pre id='dm05jgpv'><center id='2o8wuj2a'></center></pre></bdo></b><th id='8vrh9100'></th></span></q></dt></tr></i><div id='aqba3otb'><tfoot id='utvzvca1'></tfoot><dl id='jdx91qqq'><fieldset id='di35wxww'></fieldset></dl></div>
      <tfoot id='d8o7ji80'></tfoot>
    5. <small id='5j08y90a'></small><noframes id='mv45ga46'>

        <tbody id='u9xgzib0'></tbody>

        1. <legend id='jv220inf'><style id='roto64uv'><dir id='3nyrpfv3'><q id='pw97mhli'></q></dir></style></legend>
            <bdo id='5fk7u5kf'></bdo><ul id='ttbenn7u'></ul>

                长沙网站建设小编为您讲解当PHP版本高于5.5时,织梦DedeCMS无法使用关键词內链,下面是此问题的解决方法。

                打开 /include/arc.archives.class.php 找到

                $body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body);

                改成

                
                
                 
                global $cfg_replace_num;
                 
                if($cfg_replace_num > 0)
                 
                {
                 
                $query = "SELECT char_length(keyword) AS num,aid,keyword,rpurl,rank FROM dede_keywords WHERE rpurl<>'' ORDER BY num DESC";
                 
                $this->dsql->SetQuery($query);
                 
                $this->dsql->Execute();
                 
                while($row = $this->dsql->GetArray())
                 
                {
                 
                $key = trim($row['keyword']);
                 
                $key_url=trim($row['rpurl']);
                 
                $body = str_replace_limit($key, "<a href='$key_url' target='_blank'><u>$key</u></a>", $body, $cfg_replace_num);
                 
                }
                 
                }
                 
                else
                 
                {
                 
                $query = "SELECT char_length(keyword) AS num,aid,keyword,rpurl,rank FROM dede_keywords WHERE rpurl<>'' ORDER BY num DESC";
                 
                $this->dsql->SetQuery($query);
                 
                $this->dsql->Execute();
                 
                while($row = $this->dsql->GetArray())
                 
                {
                 
                $key = trim($row['keyword']);
                 
                $key_url=trim($row['rpurl']);
                 
                $body = str_replace($key, "<a href='$key_url' target='_blank'><u>$key</u></a>", $body);
                 
                }
                 
                }

                继续找到

                //高亮专用

                在它上面加入

                
                
                 
                //指定替换次数功能
                 
                function str_replace_limit($search, $replace, $subject, $limit)
                 
                {
                 
                if(is_array($search))
                 
                {
                 
                foreach($search as $k=>$v)
                 
                {
                 
                $search[$k] = '#(?<!>)(?!<)'. preg_quote($search[$k], '#'). '#';
                 
                }
                 
                }
                 
                else
                 
                {
                 
                $search = '#(?<!>)(?!<)'. preg_quote($search, '#'). '#';
                 
                }
                 
                return preg_replace($search, $replace, $subject, $limit);
                 
                }

                完成

                二度创作,如有侵权请联系删除。如没特殊注明,文章均为庚午网络原创,转载请注明https://www.hngengwu.com/gengwuwenku/722.html
                <i id='6o8o5ok9'><tr id='sgumhpfp'><dt id='6t6grnkp'><q id='qutbjb9e'><span id='5ewqitqy'><b id='6o61betk'><form id='ksfihfa8'><ins id='fth47xga'></ins><ul id='ajkbw4d9'></ul><sub id='630e9exc'></sub></form><legend id='o28j416w'></legend><bdo id='q5p736jo'><pre id='jfusi7za'><center id='raveu7fa'></center></pre></bdo></b><th id='y39tm1i4'></th></span></q></dt></tr></i><div id='slgd28gi'><tfoot id='70r2r742'></tfoot><dl id='g8c4rj2c'><fieldset id='exg2v4cz'></fieldset></dl></div>

                  <bdo id='r8q2q3qr'></bdo><ul id='np0evg3e'></ul>
                <tfoot id='jkzu0mhz'></tfoot>

                    <small id='5dxlu6qd'></small><noframes id='idyab9j7'>

                  1. <legend id='03z0f1jo'><style id='gjzg3w8g'><dir id='n5dous47'><q id='6nzwajxh'></q></dir></style></legend>
                  2. 多一份策划方案,总有益处。

                    请直接添加技术总监微信联系咨询

                    网站设计 品牌营销

                    多一份参考,总有益处

                    联系庚午网络,获得专属《策划方案》及报价

                    咨询相关问题或预约面谈,可以通过以下方式与我们联系

                    业务热线:18574395938 / 大客户专线:18574395938