Advertisement
Guest User

redis test script

a guest
Jun 6th, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. [root@mastercontrol ~/redis-failover]# cat redtest.php
  2. <?php
  3.     require('Redis.php');
  4.  
  5.     $redis = new redisent\Redis('redis://vip', '5');
  6.     $file = fopen("list.txt", 'w+');
  7.    
  8.     $i=0;
  9.     while(isset($i))
  10.     {
  11.         $redis->rpush('number', $i);
  12.         fwrite($file, "$i\n"); // So we can verify what should have been written
  13.         $i++;
  14.     }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement