pg_host
pg_host
Returns the host name associated with the connection
string **pg_host** $connection
returns the host name of the given
PostgreSQL instance is
connected to.
pg_host``connection
connection
A containing the name of the host the
is to, or an empty string on error.
string``connection
Voorbeeld: example
<?php
$pgsql_conn = pg_connect("dbname=mark host=localhost");
if ($pgsql_conn) {
print "Successfully connected to: " . pg_host($pgsql_conn) . "<br/>\n";
} else {
print pg_last_error($pgsql_conn);
exit;
}
?>
pg_connect``pg_pconnect