PHP 手冊
上一頁 |  | 下一頁

# mysql_get_host_info

(PHP 4 >= 4.0.5, PHP 5)

mysql_get_host_info -- Get MySQL host info

## Description

string mysql_get_host_info ( [resource link_identifier])

mysql_get_host_info() returns a string describing the type of connection in use for the connection link_identifier, including the server host name. If link_identifier is omitted, the last opened connection will be used.

示範 1.mysql_get_host_info() 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()); ?>`
The above example would produce the following output:
    MySQL host info: Localhost via UNIX socket

See also mysql_get_client_info(), mysql_get_proto_info() and mysql_get_server_info().

上一頁 | 最開頭 | 下一頁
mysql_get_client_info | 上一層 | mysql_get_proto_info