Redis
 sql >> Base de Dados >  >> NoSQL >> Redis

Conectando-se ao Redis To Go com PHP

$db = 1;
$password='password';
$aRedisServers['host']="127.0.0.1";
$aRedisServers['port']= "6379";
$r = new Predis_Client();
$r->connect($aRedisServers['host'], $aRedisServers['port']);
$r->auth($password);
$r->select($db);

$r->set("set","new");
echo $r->get("set");
//output new