最新活动:电脑PC端+手机端+微网站+自适应网页多模板选择-建站388元起价!!!
要源码
当前位置:主页 > 网站建设 > 织梦DEDECMS采集没有自动生成摘要和关键字的解决

织梦DEDECMS采集没有自动生成摘要和关键字的解决

时间:2023-05-26 14:05:26 阅读: 文章分类: 网站建设 作者: 建站小能手

导读:建站问题建站问题织梦 5.6采集到了内容,可没有自动生成摘要和关键字,关键字和摘要都是空的。 可能很多人都遇到了和我一样的问题,在论坛实在没找到好的解决办法,就自己动手去改改文网站建设多少钱企业网站建设。

网站建设多少钱企业网站建设织梦 5.6采集到了内容,可没有自动生成摘要和关键字,关键字和摘要都是空的。 可能很多人都遇到了和我一样的问题,在论坛实在没找到好的解决办法,就自己动手去改改文件。废话不多说了。 下面是我的解决办法: 1、修改 include/dedecollection.class.php //自 […]

织梦5.6采集到了内容,可没有自动生成摘要和关键字,关键字和摘要都是空的。 可能很多人都遇到了和我一样的问题,在论坛实在没找到好的解决办法,就自己动手去改改文件。废话不多说了。 下面是我的解决办法:

1、修改 include/dedecollection.class.php

//自动分析关键字和摘要   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网站优化软件

//自动分析关键字和摘要   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];   } 

改了上面的, 还有另一个地方需要修改的

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网站优化

用下面的代码替换掉上面的:

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

关键词标签: 解决办法 CMS 自动生成

声明: 本文由我的SEOUC技术文章主页发布于:2023-05-26 ,文章织梦DEDECMS采集没有自动生成摘要和关键字的解决主要讲述解决办法,自动生成,CMS网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_10214.html

我的IDC 网站建设技术SEOUC.COM
专注网站建设,SEO优化,小程序设计制作搭建开发定制网站等,数千家网站定制开发案例,网站推广技术服务。
  • 5000+合作客服
  • 8年从业经验
  • 150+覆盖行业
  • 最新热门源码技术文章