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