phpredis擴展下載地址 http://windows.php.net/downloads/pecl/snaps/redis/php
VC11版本php擴展:https://windows.php.net/downloads/pecl/releases/redis/2.2.7/git
1.選擇redis DLL文件擴展github
phpinfo 查看VC版本 還有系統位數 再進行下載 redis
因此選擇上面這個 選擇ts就行apache
2. 將下載好的php_redis.dll放入E:\wamp64\bin\php\php5.6.25\ext文件夾中,而後再E:\wamp64\bin\apache\apache2.4.23\bin\php.ini添加代碼:windows
extension=php_redis.dll服務器
重啓服務器測試
3.再打開phpinfo 就有了redis擴展 spa
安裝redis服務.net
https://github.com/MSOpenTech/redis/releases
下載zip文件後解壓到建立的文件夾E:\redis
將這個文件夾地址E:\redis放到環境變量Path中
而後CMD命令行
這個時候能夠寫php文件進行測試
建立redis_connect.php
<?php //鏈接本地的 Redis 服務 $redis = new \Redis(); $redis->connect('127.0.0.1', 6379); echo "Connection to server sucessfully"; //查看服務是否運行 echo "Server is running: " . $redis->ping().'<br>'; ?>
這就成功了