This experiment is based on the successful installation of Redis server. The following steps are required to install the Redis extension:
1, open the php.ini file, and find the code: Extension=php_redis.dll, and remove the previous # good, if not found, add the code directly: Extension=php_redis.dll
2. Download the Php_redis.dll file online and put it in the Ext extension directory of PHP. (Step two to be wordy.) Download the version must correspond to your PHP version, and compiler VC version, if the version does not correspond, it will not help, remember, remember, the version to correspond)
Test whether the installation was successful, method one:
1 <? PHP 2 $redis New Redis (); 3 $redis->connect ("192.168.11.11", "6379"); 4 $redis->set ("name", "Me"); 5 Echo $redis->get ("name"); // the output string me is successful
Test the installation is successful, method two:
Print the Phpinfo () function. If the following information appears, it succeeds.
Installing Redis Extensions in PHP under window