POST TIME:2018-08-14 14:51
修改:dedection目錄article_add_action.php文件
在【//寫入Tag索引】與【InsertTags($dsql,$tag,$arcID,0,$typeid,$arcrank);】之間插入:
if($autokey==1){
require_once(DEDEADMIN."/../include/pub_splitword_[url]www.php[/url]");
$tag = "";
$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($tag)>=50) break;
else $tag .= $k." ";
}
/*foreach($allindexs as $k){
if(strlen($keywords)>=50) break;
else if(!in_array($k,$titleindexs)) $keywords .= $k." ";
}*/
}
$sp->Clear();
unset($sp);
//$tag = preg_replace("/#1#|#2#/","",$tag);
$tag = addslashes($tag);
}
1 等于 p
2 等于 e
分頁干擾 所以替換
默認(rèn)只對(duì)文章標(biāo)題分詞,要想加入內(nèi)容分詞請(qǐng)刪除注釋!
圖片:Snap2.jpg
圖片:Snap3.jpg