0

我按照指南中的所有步骤操作,并在我的 Ubuntu 14.04 服务器上成功安装了 Sphinx。但是,我无法在我的 php 页面中使用 SphinxQL (by Foolz)。这是我正在使用的代码:

<?php

use Foolz\SphinxQL\Connection;
use Foolz\SphinxQL\SphinxQL;
 
$conn = new Connection();
$conn->setParams(array('host' => 'localhost', 'port' => 9306));
 
$query = SphinxQL::create($conn)
->select('*')
->from('documents')
->match('desc', 'testing');
 

$result = $query->execute();

这给了我一个“致命错误:找不到类'Foolz\SphinxQL\Connection' ”。

Sphinx 安装在/etc/sphinxsearch/目录中。

4

0 回答 0