Recently wanted to install the Redis extension in the 5.6 version of the development environment, the results of a half-day is a broken link, hereby make a backup
Https://pecl.php.net/package/redis/2.2.7/windows
Then, put the Php_redis.dll in the PHP ext folder
Finally in PHP.ini Plus
Extension=php_redis.dll
Restart the environment to run the following code, if Redis is started
$redis = new Redis (), $redis->connect (' 127.0.0.1 ', 6379), echo "Connection to Server sucessfully";//See if the service is running echo " Server is running: ". $redis->ping ();
Execute the script with the output as:
Connection to server Sucessfullyserver is Running:pong
Connect the local Redis service $redis = new Redis (); $redis->connect (' 127.0.0.1 ', 6379); echo "Connection to Server sucessfully"; Set up Redis string data $redis->set ("Tutorial-name", "Redis Tutorial"); Get the stored data and output echo "Stored string in Redis::". $redis->get ("Tutorial-name");
Execute the script with the output as:
Connection to server sucessfullystored string in Redis:: Redis Tutorial
Windows PHP5 Installing the Redis extension