getRequest()->string("key"); $p=$this->getRequest()->intval("page",1); $count=10; $res=Sphinx::instance()->query($keyword, ($p-1)*$count, $count); $ids=array_keys($res['matches']); $result=Hash::select(array(),array('id'=>$ids)); foreach ($result as &$file) { $temp=File::getOne(array('info_hash'=>$file['info_hash'])); if ($temp){ $temp=json_decode($temp['file_list'],true); $new=array(); foreach ($temp as $key=>$value){ if (strpos($value['path'], "_____")===false){ $new[]=$value; } } $file['file_list']=$new; }else{ $file['file_list']=array(array('path'=>$file['name'],'lengh'=>$file['length'])); } } echo "
";
        print_r($result);
        echo "
"; } }