使用步骤:
1.加载 splitword.class.php 文件并提取
require_once './../splitword.class.php'; //加载提取关键字文件
$sp = new SplitWord('utf-8','utf-8');
//初始化给予两个默认字符集(本套提取关键词是UTF-8)
$sp->SetSource($_POST['title'],'utf-8','utf-8'); //参数(需要提取的词,字符集)
$sp->StartAnalysis();
//开始执行分析
$titleindexs = preg_replace("/\#p\#|\#e\#/",'',$sp->GetFinallyIndex()); //提取关键词
2.设置splitword.class.php 加入字典
①:所需文件:base_dic_full.dic base_dic_full.zip words_addons.dic zip.class.php