= 4.3.0, PHP 5, PHP 7, PHP 8)pg_get_pid — Ping 數(shù)據(jù)庫(kù)連接說(shuō)明pg_get_pid(resource $connection): intpg_get_pid() 取得后端(數(shù)據(jù)庫(kù)服務(wù)器進(jìn)程)的 PID。PID 用來(lái)檢查">
(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
pg_get_pid — Ping 數(shù)據(jù)庫(kù)連接
$connection
): int
pg_get_pid() 取得后端(數(shù)據(jù)庫(kù)服務(wù)器進(jìn)程)的
PID。PID 用來(lái)檢查其它進(jìn)程是否發(fā)送了
NOTIFY
消息。
示例 #1 PostgreSQL 后端 PID
<?php
$conn = pg_pconnect("dbname=publisher");
if (!$conn) {
echo "An error occured.\n";
exit;
}
// Backend process PID. Use PID with pg_get_notify()
$pid = pg_get_pid($conn);
?>
參見 pg_get_notify()。