解決織夢(mèng)采集沒(méi)有自動(dòng)生成摘要和關(guān)鍵字的問(wèn)題

這篇文章給大家分享的是有關(guān)解決織夢(mèng)采集沒(méi)有自動(dòng)生成摘要和關(guān)鍵字的問(wèn)題的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧。

站在用戶的角度思考問(wèn)題,與客戶深入溝通,找到嘉魚網(wǎng)站設(shè)計(jì)與嘉魚網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:成都網(wǎng)站制作、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、申請(qǐng)域名、虛擬主機(jī)、企業(yè)郵箱。業(yè)務(wù)覆蓋嘉魚地區(qū)。

織夢(mèng)采集沒(méi)有自動(dòng)生成摘要和關(guān)鍵字怎么辦?

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

推薦學(xué)習(xí):織夢(mèng)cms

織夢(mèng)5.6采集到了內(nèi)容,可沒(méi)有自動(dòng)生成摘要和關(guān)鍵字,關(guān)鍵字和摘要都是空的。

可能很多人都遇到了和我一樣的問(wèn)題,在論壇實(shí)在沒(méi)找到好的解決辦法,就自己動(dòng)手去改改文件。廢話不多說(shuō)了。

下面是我的解決辦法:

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];  
}

感謝各位的閱讀!關(guān)于解決織夢(mèng)采集沒(méi)有自動(dòng)生成摘要和關(guān)鍵字的問(wèn)題就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!

網(wǎng)頁(yè)名稱:解決織夢(mèng)采集沒(méi)有自動(dòng)生成摘要和關(guān)鍵字的問(wèn)題
標(biāo)題網(wǎng)址:http://bm7419.com/article44/jcshhe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站、商城網(wǎng)站全網(wǎng)營(yíng)銷推廣、網(wǎng)站收錄、定制開發(fā)、做網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運(yùn)營(yíng)