1. Installing Redis
Githttps://github.com/msopentech/redis/releases
2. Test Redis
Windows run (shortcut key: Windows key +r), enter "cmd" command, enter the DOC operating system window;
Accessing the Redis installation directory using commands
2.1 Turn on the Redis daemon (enter the Redis installation directory)
Redis-server.exe redis-windows-conf
2.2 Entering the Redis client (enter the Redis installation directory)
3. Installing the Redis Extension for PHP
Https://pecl.php.net/package/redis
Select the appropriate Redis extension package based on the phpinfo () information
4. Place the Php_redis.dll and php_redis.pdb two files of the Redis expansion pack in the Ext folder
5. Modify the php.ini file
Extension=php_redis.dll
6. Verify that the Redis extension is turned on
View Phpinfo () information, search for Redis
7.php Connect and test the Redis database (remember to turn on Redis service)
New test.php
<? $redisnew$redis->connect (' 127.0.0.1 ', 6379); $redis->set (' name ', ' KLC 'echo$redis->get (' name ');? >
Access test.php, output KLC, test pass
PS: Redis service must be turned on using Redis
PHP Open Redis Extension