PDF (US Ltr)- 2.4Mb
PDF (A4)- 2.4Mb
Copyright 1997-2022 the PHP Documentation Group.
mysqli::$host_info
mysqli_get_host_info
Returns a string representing the type of connection used
Description
Object oriented style
stringmysqli->host_info;
Procedural style
stringmysqli_get_host_info(mysqlimysql);
Returns a string describing the connection represented by themysql
parameter (including the server host name).
Parameters
-
link
-
Procedural style only: A link identifier returned by
mysqli_connect
ormysqli_init
Return Values
A character string representing the server hostname and the connection type.
Examples
Example 3.48$mysqli->host_info
example
Object oriented style
host_info); /* close connection */ $mysqli->close(); ?>
Procedural style
The above examples will output:
Host info: Localhost via UNIX socket
See Also
mysqli_get_proto_info |