9951 explained code solutions for 126 technologies


php-redisCheck Redis connection


$r = new Redis(); 
$r->connect('127.0.0.1', 6379); 
if ( $r->ping() ) {
  echo 'Connection is ok';
}ctrl + c
new Redis()

create Redis object

connect(

connect to specified host and port

ping()

send ping command to Redis and returns true on successful reply from server