时间:2021-07-01 10:21:17 帮助过:22人阅读
$r1 = new \Redis();
$r1->pconnect('/redis.sock');
$r1->select(1);
$r2 = new \Redis();
$r2->pconnect('/redis.sock');
$r2->select(2);
$r2->set('a','r1');
var_dump($r1->get('a'));
var_dump($r2->get('a'));
输出都是r1,请问有有效解决方案吗?
$r1 = new \Redis();
$r1->pconnect('/redis.sock');
$r1->select(1);
$r2 = new \Redis();
$r2->pconnect('/redis.sock');
$r2->select(2);
$r2->set('a','r1');
var_dump($r1->get('a'));
var_dump($r2->get('a'));
输出都是r1,请问有有效解决方案吗?
pconnect换成connect