Connecting to Redis To Go with PHP

前端 未结 3 537
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 23:15

I am a newbie with Redis...I just recently picked up Redisent to work with Redis in PHP...and I am having tons of fun! However, I signed up for the Redis to go service, and

3条回答
  •  萌比男神i
    2020-12-11 23:36

    predis is the prefered library(active development => 6 Januari 2011) to use.

    redis://$x:$y@$z
    

    Then you need the following code to get it working(I tested it):

    auth($y);
    $redis->incr('counter');
    echo $redis->get('counter');
    echo "\n";
    

    The strange thing is $x. It is not needed at all?

提交回复
热议问题