在thinkPHP5.0已安裝redis擴(kuò)展,但是報(bào) Class 'Redis' not found in D:\xampp\htdocs\workermanTest\application\index\controller\Worker.php:41不在worker的代碼中使用redis是好使的。
部分代碼如下:
[attach]2188[/attach]
?
不在worker代碼中? 那應(yīng)該你使用的是非PHP-CLI 環(huán)境的redis,? ?workerman是工作在 PHP-CLI 模式下的,必須安裝PHP-CLI環(huán)境的redis擴(kuò)展,這么來(lái)校驗(yàn):
【linux】?/path/to/php? -m |? grep -i redis?
【windows】\path\to\php -m? | findstr redis