galvani/php-redis

此包最新版本(1.3.1)没有提供许可证信息。

php-redis 包含用于连接 redis 数据库的 php5 类,以及 redis 中所有可用命令的方法。

1.3.1 2013-04-04 09:30 UTC

This package is not auto-updated.

Last update: 2024-09-14 14:45:08 UTC


README

php-redis 包含用于连接 redis 数据库的 php5 类,以及 redis 中所有可用命令的方法。

快速开始

  • redis.io 安装 Redis

  • 从这里下载最新的 php-redis 类:here

  • 编写一些代码

      # Connecting
      $r = new Redis('localhost', 6379);
      
      # Save some value
      $r->some_key = 'hello world';
      
      # Outputting it
      echo $r->some_key;
      
      # Call any redis method (including methods added in redis 2.*)
      echo $r->zcard('zkey');
    

更新日志

1.0 - Initial implementation with all functions implemented up to redis 1.0
1.1 - The unified request protocol is used (intruduced in redis 1.2). 
	- Redis implements the __call magic method. Any non-implemented redis method can be called via ->methodname(param1, ...)
1.2 - pipeline support. ->pipeline_begin() and then execute any number of commands - each will return null
	Then run ->pipeline_responses() to get all of the responses as array and end the pipeline mode