我正在尝试使用 gearman-php-extensions 中的类来创建gearman任务GearmanClient。我可以使用命令提示符在下面的程序中运行-
//php client.php works fine
<?php
$client= new GearmanClient();
$client->addServer();
$task = $client->do("send", "hi");
?>
但我不想在某些yii controller. 似乎yii无法找到GearmanClient上课的路径,但为什么呢?
我也在编写yii程序eclipse。作为php命令并且eclipse都使用同一个php库,我的yii控制器应该可以正常工作。相反,我的浏览器会出现错误,例如-
PHP warning
include(GearmanClient.php): failed to open stream: No such file or directory
#plus some warnings and the yii stack trace.