38369 2016-08-26 11:06:26 1997次浏览 0条回复 0 0 0

生成索引 .\bin\indexer.exe –c .\etc\csft_mysql.conf --all 搜索服务打开 .\bin\searchd.exe -c .\etc\csft_mysql.conf 遍历数组

$aa=$res['matches'];
// print_r($aa);die;
$ar=array();
$a='';
foreach($aa as $k=>$v){
    $a.=$k.',';	
}
$where=substr($a,0,strlen($a)-1);
$arr=yii::$app->db->createCommand("select * from lianxi where id in ($where)")->queryAll();//打印数据
foreach ($arr as $key => $value) {
    $arr[$key]['u_name']=str_replace($sou,"<font color='red'>$sou</font>", $value['u_name']);
}
    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册