Skip to content

Instantly share code, notes, and snippets.

@isopan
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isopan/c06000b0ae61d8149ccf to your computer and use it in GitHub Desktop.
Save isopan/c06000b0ae61d8149ccf to your computer and use it in GitHub Desktop.
<?php
$redis = new Redis();
$redis->connect("127.0.0.1",6379);
$redis->set('key', 'value');
$v = $redis->get('key');
var_dump($v);
$redis_slave01 = new Redis();
$redis_slave01->connect("192.168.100.11",6379);
$v = $redis_slave01->get('key');
var_dump($v);
$redis_slave02 = new Redis();
$redis_slave02->connect("192.168.100.12",6379);
$v = $redis_slave02->get('key');
var_dump($v);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment