Second, php5.4 connection using Redis,
1. Download the Phpredis.dll expansion pack first. : Https://github.com/nicolasff/phpredis/downloads
See TS VC9 with Phpinfo. Then the downloaded version will correspond well
TS version phpredis_5.4_vc9_ts.7z NTS version phpredis_5.4_vc9_nts.7z
2. After extracting two files, two files are copied to the Ext directory of PHP directory.
3, modify the php.ini file. Join extension Extensions
Extension=php_igbinary.dll
Extension=php_redis.dll
4. Restart Apache to view the Phpinfo interface. The following indicates a successful installation
5. Phpredis Hellow Word start your redis use
<?php
$redis
=
new
Redis();
//redis对象
$redis
->connect(
"192.168.60.6"
,
"6379"
);
//连接redis服务器
$redis
->set(
"test"
,
"Hello World"
);
//set字符串值
echo
$redis
->get(
"test"
);
//获取值
?>
|
Detailed manual for working with Redis in PHP. Chinese Manual: Http://www.cnblogs.com/zcy_soft/archive/2012/09/21/2697006.html
Redis configuration file Detailed description, the following pick to Http://www.cnblogs.com/wenanry/archive/2012/02/26/2368398.html
PHP Windows extended Redis