$redis = new Redis(); //实例化
$redis->connect("localhost",6379); //连接服务器
或者:$redis = connect("127.0.0.1",6379); //连接速度较快
$redis->auth("xxxx"); //授权
$redis->set("name","yuuu"); //相关操作
$redis->keys("*");
原文地址:https://www.cnblogs.com/ysx215/p/9015782.html
时间: 2024-10-10 05:44:11