foreach($kws as $k){$k = trim($k);if($k!=""){if($i > $maxkey){break;}$myrow = $this->dsql->GetOne("select * from meiwen_keywords where keyword='$k' And rpurl<>'' ");if(is_array($myrow)){$karr[] = $k;$GLOBALS['replaced'][$k] = 0;$kaarr[] = "<span style="text-decoration: underline;">$k</span>";}$i++;}}四、并在注释或删除的代码下面加入以下代码:
$dsql = new DedeSql(false);$query="select * from meiwen_keywords where rpurl<>'' ";$dsql->SetQuery($query);$dsql->Execute();while($row = $dsql->GetArray()){$key = trim($row['keyword']);$rul=trim($row['rpurl']);if($rul!="")if(!in_array($key, $kw))if(!in_array($kw,$key))if(substr_count($body,$key)<20){$karr[] = $key;$kaarr[] = "$key";}}五、OK,已经修改完成了。直接复制上面代码,文章内同样的关键词只会出现一个链接。 六、一键更新网站->更新所有 。
新闻热点
疑难解答