【问题标题】:CodeIgniter can't find GearmanClientCodeIgniter 找不到 GearmanClient
【发布时间】:2015-08-05 06:07:54
【问题描述】:

我已经为我的 Apache/CodeIgniter 服务器设置了 gearman。

我在运行时得到了这个输出:

php -i | grep 齿轮人

我可以使用命令行创建 GearmanClient。

 $gmclient = new GearmanClient();
 $gmclient->addServer($id);

我无法在 CodeIgniter 控制器中创建 GearmanClient。 不断收到此错误:

找不到类 GearmanClient。

【问题讨论】:

    标签: php codeigniter classnotfoundexception gearman


    【解决方案1】:

    检查是否为所有 SAPIs 启用了 Gearman 扩展。

    可能是命名空间问题。尝试使用fully qualified name $gmclient = new \GearmanClient();How do I use internal or global classes in a namespace?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-09
      • 2012-02-11
      • 1970-01-01
      • 2013-11-27
      • 2016-08-25
      • 2016-10-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多