【laravel5.4】安装指定版本的predis 和 处理laravel5.*安装使用Redis以及解决Class 'Predis\Client' not found和Fatal error: Non-static method Redis::set() cannot be called statically错误

(predis下载地址:https://packagist.org/packages/predis/predis)

1、cmoposer 命令行: php composer require predis/predis:1.0.4

2、若服务器已安装了 phpredis扩展,需要进行更名处理:

3、出现:

Class 'Predis\Client' not found

因为 你没有装predis 类库。

posted @ 2018-04-20 23:21  PHP急先锋  阅读(3043)  评论(0编辑  收藏  举报