在Php中安装SphinxQL

时间:2015-04-28 11:45:31

标签: php namespaces sphinx sphinxql

我按照this指南中的所有步骤操作,并在我的Ubuntu 14.04服务器上成功安装了Sphinx。但是,我无法在我的php页面中使用SphinxQL(由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();

这给了我一个&#34; 致命错误:Class&#39; Foolz \ SphinxQL \ Connection&#39;找不到&#34;。

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

0 个答案:

没有答案
相关问题