伊谢尔伦2017-04-10 15:55:09
require_once(dirname(__FILE__).'/SphinxClient.class.php');
$sph = new SphinxClient()
$sph->SetServer('localhost', 9312);
$sph->SetConnectTimeout(5);
$sph->SetMatchMode(SPH_MATCH_ANY);
$sph->SetLimits(0, 1, 10000);
$result = $sph->query($keyword, '*');
$total = $result['total'];