pg_ping

(PHP 4 >= 4.3.0, PHP 5, PHP 7)

pg_pingPing ���ݿ�����

˵��

pg_ping ( resource $connection ) : bool

pg_ping() ping ���ݿ����ӣ�����ж������������ӡ���������ڻ״̬���� TRUE�����򷵻� FALSE��

Example #1 pg_ping()

<?php 
$conn 
pg_pconnect ("dbname=publisher");
if (!
$conn) {
    echo 
"An error occured.\n";
    exit;
}

if (!
pg_ping($conn))
    die(
"Connection is broken\n");
?>
�μ� pg_connection_status() �� pg_connection_reset()��