请教列表内容中如何使用php语句 帝国cms

2025-02-27 00:15:16
推荐回答(2个)
回答1:


$redis->subscribe(array('channel-1'), function ($redis, $chan, $msg) {
// do something
echo $msg;
});

然后在其它的程序里向channel-1发送你需要发送的消息
$redis->publish('channel-1', 'hello, world!');

回答2: