: This article mainly introduces the wamp extension redis in the window. if you are interested in the PHP Tutorial, refer to it. When I used the redis function at work, I needed to extend it. I found some information on the Internet and recorded it myself.
Https://github.com/nicolasff/phpredis/downloads
Go to this place to download and find your own version. The first two are 32-bit and 64-bit, because my local php version 5.2 uses the third compressed package. Start the corresponding dll and restart apache. remember to synchronize php/php. ini with apache/php. ini.
Run the redis service before testing in the PHP file. the following files are in the first and second packages.
Install redis-server.exe in the double-click directory to start the redis Cache service.
Double-click redis-cli.exe in the installation directory to open the cache client.
You can put the operations started in these two statements into a file and change them to bat for automatic operation.
Start "redis-server"/min cmd/c redis-server D: \ redis. confstart "redis-client"/min cmd/c redis-cli
After running the redis service, you can run the php program for testing.
$ Redis = new Redis (); $ redis-> connect ('2017. 0.0.1 ', 127); $ redis-> set ('test', 'helloworld! '); Echo $ redis-> get ('test ');
The above introduces the wamp extension redis in the window, including some content, hope to be helpful to friends who are interested in the PHP Tutorial.