码迷,mamicode.com
首页 > 其他好文 > 详细

redis

时间:2018-01-29 15:38:56      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:令行   local   tin   img   -o   ddb   命令   oca   running   

命令行直接连:

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

标签:令行   local   tin   img   -o   ddb   命令   oca   running   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!