重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

安装php连接rediscluster扩展

1、下载群集扩展

万年网站建设公司成都创新互联公司,万年网站设计制作,有大型网站制作公司丰富经验。已为万年上1000+提供企业网站建设服务。企业网站搭建\成都外贸网站建设要多少钱,请找那个售后服务好的万年做网站的公司定做!

wget https://github.com/nrk/predis/archive/v1.0.zip
unzip v1.0
cp -Rf predis-1.0 /u01/html/predis
注:/u01/html为系统目录

2、连接redis集群

 'redis'];
$redis = new Predis\Client($parameters, $options);
$x=rand(10,100);
//设置 redis 字符串数据
$redis->set("y".$x, "tank".$x*2); 
// 获取存储的数据并输出
$result = $redis->get("y".$x);  
//输出结果
echo $result;
?>

注:Predis只是几个PHP文件,不需要安装到PHP扩展中,只需要把文件拷到php能调用的目录就行


文章名称:安装php连接rediscluster扩展
网页URL:http://cqcxhl.cn/article/iedhcj.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP