我正在使用 Ubuntu 12.04 + PHP + Nginx + MySQL 5.6
我的项目路径是 /usr/share/nginx/www/project1
我已经成功安装了 Sphinx 并且能够连接完整的 API。但我喜欢使用 SphinxQL 查询生成器。
我不熟悉作曲家和 php 命名空间。我已经在我的机器上安装了作曲家。
我将“SphinxQL-Query-Builder-master”文件夹复制到我的项目根目录。
现在我执行了这个
use Foolz\SphinxQL\SphinxQL;
use Foolz\SphinxQL\Connection;
// create a SphinxQL Connection object to use with SphinxQL
$conn = new Connection();
$conn->setParams(array('host' => 'domain.tld', 'port' => 9306));
$query = SphinxQL::create($conn)->select('column_one', 'colume_two')
->from('index_ancient', 'index_main', 'index_delta')
->match('comment', 'my opinion is superior to yours')
->where('banned', '=', 1);
$result = $query->execute();
这返回给我致命错误:找不到类'Foolz\SphinxQL\Connection'
任何人都可以帮助我一步一步地指导这个吗?
谢谢!!