首页 > 其他 > 详细

redis

时间:2018-01-29 15:22:42      阅读:186      评论:0      收藏:0      [点我收藏+]
命令行直接连:

redis-cli -h host -a 6379:password

php扩展:

$redis = new Redis();
$redis->connect(host,6379);
$res = $redis->auth(password);

技术分享图片
<?php
//Connecting to Redis server on localhost
$redis = new Redis();
$redis->connect(‘host‘, 6379);
echo "Connection to server sucessfully";
//check whether server is running or not echo "Server is running: "+ $redis->ping();
?>

redis

原文:http://blog.51cto.com/wsw26/2066341

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!