标签:
1、下载php相关redis扩展(apache选vc6),下载地址:
https://github.com/phpredis/phpredis/downloads
2、修改php.ini,增加下面两项:
extension=php_igbinary.dll
extension=php_redis.dll
3、下载redis
https://github.com/dmajkic/redis/downloads
注:启用服务器(双击redis-server.exe启动)才可以使用。
4、范例:
<?php
$host = "127.0.0.1";
$port = 6379;
$redis = new Redis();
$redis->connect($host,$port);
$redis->set("testredis","success");
echo $redis->get("testredis");die();
?>
标签:
原文地址:http://www.cnblogs.com/sai564/p/4427378.html