摘要: 代码: 1 <?php 2 3 /** 4 * 5 */ 6 class myRedis { 7 private static $redis = null; 8 9 /** 10 * @return null|Redis 11 */ 12 public static function instanc 阅读全文
posted @ 2018-08-21 21:10 geloutingyu 阅读(1655) 评论(0) 推荐(0) 编辑
摘要: 一、Redis连接与认证 1 //连接参数:ip、端口、连接超时时间,连接成功返回true,否则返回false 2 $ret = $redis->connect('127.0.0.1', 6379, 30); 3 //密码认证:成功返回true,否则返回false 4 $ret = $redis-> 阅读全文
posted @ 2018-08-21 19:48 geloutingyu 阅读(300) 评论(0) 推荐(0) 编辑