織夢(mèng)DEDECMS采集沒有自動(dòng)生成摘要和關(guān)鍵字的解決
導(dǎo)讀:建站問題建站問題織夢(mèng) 5.6采集到了內(nèi)容,可沒有自動(dòng)生成摘要和關(guān)鍵字,關(guān)鍵字和摘要都是空的。 可能很多人都遇到了和我一樣的問題,在論壇實(shí)在沒找到好的解決辦法,就自己動(dòng)手去改改文網(wǎng)站建設(shè)多少錢企業(yè)網(wǎng)站建設(shè)。
織夢(mèng) 5.6采集到了內(nèi)容,可沒有自動(dòng)生成摘要和關(guān)鍵字,關(guān)鍵字和摘要都是空的。 可能很多人都遇到了和我一樣的問題,在論壇實(shí)在沒找到好的解決辦法,就自己動(dòng)手去改改文件。廢話不多說了。 下面是我的解決辦法: 1、修改 include/dedecollection.class.php //自 […]
織夢(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]; }
用下面一段代碼替換上面的seo網(wǎng)站優(yōu)化軟件
//自動(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]; } 百度seo網(wǎng)站優(yōu)化
用下面的代碼替換掉上面的:
preg_match("/<meta[\s]+name=['\"]description['\"] content=['\"](.*)['\"]/isU",$this->tmpHtml,$inarr);網(wǎng)站建設(shè)哪家好 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)鍵詞標(biāo)簽: CMS 解決辦法 自動(dòng)生成
聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-05-26 ,文章織夢(mèng)DEDECMS采集沒有自動(dòng)生成摘要和關(guān)鍵字的解決主要講述解決辦法,自動(dòng)生成,CMS網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請(qǐng)保留鏈接: http://www.bifwcx.com/article/web_10214.html
為你推薦與織夢(mèng)DEDECMS采集沒有自動(dòng)生成摘要和關(guān)鍵字的解決相關(guān)的文章
-
通王TWCMS 2.0.3網(wǎng)站模板程序下載
(126)人喜歡 2024-01-15 -
Windows官方原版在哪里下載
(175)人喜歡 2024-01-15 -
WordPress網(wǎng)站模板發(fā)帖標(biāo)題顏色設(shè)置
(131)人喜歡 2024-01-07 -
修改discuz論壇帖子標(biāo)題80字符的長度限制
(249)人喜歡 2024-01-07 -
wordpress程序調(diào)用不帶超鏈接的Tag標(biāo)簽
(234)人喜歡 2024-01-05 -
網(wǎng)站在不同時(shí)期需調(diào)整內(nèi)容更新的方向
(112)人喜歡 2023-08-12