//---------------------------------- if($autokey==1){ require_once(DEDEADMIN."/../include/pub_splitword_[url]www.php[/url]"); $keywords = ""; $sp = new SplitWord(); $titleindexs = explode(" ",trim($sp->GetIndexText($sp->SplitRMM($title)))); // $allindexs = explode(" ",trim($sp->GetIndexText($sp->SplitRMM(html2Text($body)),200))); // if(is_array($allindexs) && is_array($titleindexs)){ foreach($titleindexs as $k){ if(strlen($keywords)>=50) break; else $keywords .= $k." "; } // foreach($allindexs as $k){ // if(strlen($keywords)>=50) break; // else if(!in_array($k,$titleindexs)) $keywords .= $k." "; // } // } $sp->Clear(); unset($sp); $keywords = preg_replace("/@p@|@e@/","",$keywords); //将前面的@换为# $keywords = addslashes($keywords); }这样发表文章时选中自动获取关键词就是只根据文章标题获取关键词了!!
新闻热点
疑难解答