婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 網(wǎng)站建設(shè) > 建站知識(shí) > 織夢(mèng)DEDECMS采集沒有自動(dòng)生成摘要和關(guān)鍵字的解決教程

織夢(mèng)DEDECMS采集沒有自動(dòng)生成摘要和關(guān)鍵字的解決教程

POST TIME:2021-05-24 02:50

織夢(mèng)5.6采集到了內(nèi)容,可沒有自動(dòng)生成摘要和關(guān)鍵字,關(guān)鍵字和摘要都是空的。
可能很多人都遇到了和我一樣的問題,在論壇實(shí)在沒找到好的解決辦法,就自己動(dòng)手去改改文件。廢話不多說了。
下面是我的解決辦法:

1、修改 include/dedecollection.class.php

//自動(dòng)分析關(guān)鍵字和摘要  
 

preg_match("/<meta[s]+name=['"]keywords['"] content=['"](.*)['"]/isU",$this->tmpHtml,$inarr);  
preg_match("/<meta[s]+content=['"](.*)['"] name=['"]keywords['"]/isU",$this->tmpHtml,$inarr2);  
if(!isset($inarr[1]) && isset($inarr2[1]))  
{  
$inarr[1] = $inarr2[1];  
} 
用下面一段代碼替換上面的
//自動(dòng)分析關(guān)鍵字和摘要  
preg_match("/<meta[s]+name=['"]keywords['"] content=['"](.*)['"]/isU",$this->tmpHtml,$inarr);  
preg_match("/<meta[s]+content=['"](.*)['"] name=['"]keywords['"]/isU",$this->tmpHtml,$inarr2);  
preg_match("/<meta[s]+name=keywords content=['"](.*)['"]/isU",$this->tmpHtml,$inarr3);  
if(!isset($inarr[1]) && isset($inarr2[1]))  
{  
$inarr[1] = $inarr2[1];  
}  
if(!isset($inarr[1]) && isset($inarr3[1]))  
{  
$inarr[1] = $inarr3[1];  
} 
改了上面的, 還有另一個(gè)地方需要修改的
preg_match("/<meta[s]+name=['"]description['"] content=['"](.*)['"]/isU",$this->tmpHtml,$inarr);  
preg_match("/<meta[s]+content=['"](.*)['"] name=['"]description['"]/isU",$this->tmpHtml,$inarr2);  
if(!isset($inarr[1]) && isset($inarr2[1]))  
{  
$inarr[1] = $inarr2[1];  
} 
用下面的代碼替換掉上面的:
preg_match("/<meta[s]+name=['"]description['"] content=['"](.*)['"]/isU",$this->tmpHtml,$inarr);  
preg_match("/<meta[s]+content=['"](.*)['"] name=['"]description['"]/isU",$this->tmpHtml,$inarr2);  
preg_match("/<meta[s]+name=description content=['"](.*)['"]/isU",$this->tmpHtml,$inarr3);  
if(!isset($inarr[1]) && isset($inarr2[1]))  
{  
$inarr[1] = $inarr2[1];  
}  
if(!isset($inarr[1]) && isset($inarr3[1]))  
{  
$inarr[1] = $inarr3[1];  
} 



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 会理县| 黔西| 汪清县| 晴隆县| 达孜县| 五原县| 时尚| 普陀区| 江孜县| 西林县| 宜宾市| 万宁市| 麦盖提县| 柞水县| 邢台县| 卢龙县| 三门峡市| 通化县| 道孚县| 望奎县| 云梦县| 江城| 聂荣县| 镇远县| 西乡县| 三原县| 海口市| 龙口市| 行唐县| 南乐县| 盐城市| 安新县| 陆川县| 曲阳县| 临武县| 虎林市| 棋牌| 富平县| 呼和浩特市| 时尚| 天气|