84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
为什么我打印phpinfo()函数时,显示是有redis扩展的(如上图),但是我调用extension_loaded('Redis')的方法时,返回false。导致不能使用new Redis()连接redis。 但是我是可以使用Predis连接redis的,这是什么原因啊。 关于Redis 与Predis连接有什么区别啊。如果分别使用这两种连接方式,分别需要安装什么东西,求大神指点。
This is equivalent to installing the redis client, and you have to install the redis server on the server side!
This means that your PHP has already installed the redis extension, and you also need to install redis.
Useclass_exists('Redis')instead to determine whether the extension is loaded successfully. The problem you encounter may be a bug. The redis extension you installed is still the RC version
class_exists('Redis')
Your screenshot shows that the redis extension has been installed, namely phpredishttps://github.com/phpredis/p...
phpredis是用C写的php扩展,需要编译安装。predis是用php写的php扩展,直接使用,laravel 默认的就是predisYou said the connection cannot be made, you can post the error to see
phpredis
predis
This is equivalent to installing the redis client, and you have to install the redis server on the server side!
This means that your PHP has already installed the redis extension, and you also need to install redis.
Use
class_exists('Redis')
instead to determine whether the extension is loaded successfully. The problem you encounter may be a bug. The redis extension you installed is still the RC versionYour screenshot shows that the redis extension has been installed, namely phpredishttps://github.com/phpredis/p...
phpredis
是用C写的php扩展,需要编译安装。predis
是用php写的php扩展,直接使用,laravel 默认的就是predis
You said the connection cannot be made, you can post the error to see