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.