织梦DEDE关键词自动内链关键词长短优先级问题
导读:织梦技巧织梦技巧解决关键词长短优先级问题的方法 打开 /include/arc.archives.class.php 找到 $query = SELECT * FROM 58p网站seo优化培训网站建设制作。
解决关键词长短优先级问题的方法 打开 /include/arc.archives.class.php 找到 $query = SELECT * FROM 58pic_keywords WHERE rpurl ORDER BY rank DESC ; 改成 $query = SELECT char_length (keyword) AS num ,aid,keyword,rpurl, rank FROM 58pic_keywords WHERE rpurl ORDER BY num DESC ; 继续找到 […]
解决关键词长短优先级问题的方法
打开 /include/arc.archives.class.php 找到
$query = "SELECT * FROM 58pic_keywords WHERE rpurl<>'' ORDER BY rank DESC";改成
$query = "SELECT char_length(keyword) AS num,aid,keyword,rpurl,rank FROM 58pic_keywords WHERE rpurl<>'' ORDER BY num DESC";继续找到
"#&seo网站优化软件quot;.preg_quote($word)."#"改成
"#(?<!>)(?!<)".preg_quote($word)."#"完成
PHP版本高于5.5无法使用关键词內链的解决方法
打开 /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 58pic_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 58pic_keywords WHERE rpurl<>'' ORDER BY num DESC"; $this->dsql->SetQuery($query); $this->网站seo优化诊断工具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); } }声明: 本文由我的SEOUC技术文章主页发布于:2023-05-25 ,文章织梦DEDE关键词自动内链关键词长短优先级问题主要讲述关键词,优先级,织梦网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_8308.html