一個簡單的腳本,用於檢查在[可能是新的]伺服器環境中正在使用的訊息佇列。
使用 php-cli 執行
<?php
$k = 0;
while (true) {
echo $key,"...\r";
if (msg_queue_exists($key))
echo "\r",$key,'::存在',"\n";
$key++;
}
?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
msg_queue_exists — 檢查訊息佇列是否存在
key
佇列鍵值。
一個簡單的腳本,用於檢查在[可能是新的]伺服器環境中正在使用的訊息佇列。
使用 php-cli 執行
<?php
$k = 0;
while (true) {
echo $key,"...\r";
if (msg_queue_exists($key))
echo "\r",$key,'::存在',"\n";
$key++;
}
?>