73

redis-Steven一直不放弃-51CTO博客

 6 years ago
source link: http://blog.51cto.com/wsw26/2066341
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

redis

命令行直接连:

redis-cli -h host -a 6379:password

php扩展:

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

redis

<?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();
?>


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK