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.