redis auth php操作

<?php
//Connecting to Redis server on localhost
$redis = new Redis();
$redis->connect('192.168.33.10', 6379);
$redis->auth('test');
echo $name = $redis->set("name","sdfs");
echo $name = $redis->get("name");
?>
posted @ 2016-12-06 18:30  brady-wang  阅读(4658)  评论(0编辑  收藏  举报