1 Download Redis windows32 bit client: Http://pan.baidu.com/s/1ntK6AyH
After downloading the proposed extract to the Web directory, such as: C:appservredis
2 in the Command Line window enter: Redis-server.exe redis.conf
If you see the following interface, it means the Redis server started successfully
3 Download the Reids extension of PHP for easy operation in PHP redis
Download Address: Http://pan.baidu.com/s/1c0u04Go (for php5.2 version)
after the download completes, unzip the Php_redis.dll to the directory
where C:appservphp5ext is located, and then modify the php.ini profile
Plus the following sentence Extension=php_redis.dll
To restart the Apache server, this redis installed
in PHP to test the following
| code is as follows |
|
<?php
$redis =new redis ();
$ Redis->connect (' 127.0.0.1 ', ' 6379 ');
$redis->set (' City ', ' Beijing ');
Echo $redis->get (' city ');
|
Output: Beijing