PHP.nl

mysql_get_host_info

mysql_get_host_info

Get MySQL host info

Waarschuwing: > mysqli_get_host_info``PDO::getAttribute``attribute``PDO::ATTR_CONNECTION_STATUS

 **mysql_get_host_info** resource $link_identifier

Describes the type of connection in use for the connection, including the server host name.

Returns a string describing the type of MySQL connection in use for the connectionreturn.falseforfailure.

Voorbeeld: example

<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
printf("MySQL host info: %s\n", mysql_get_host_info());
?>
MySQL host info: Localhost via UNIX socket

mysql_get_client_info``mysql_get_proto_info``mysql_get_server_info