10bet网址
MySQL PHP API
Download this Manual
PDF (US Ltr)- 2.4Mb
PDF (A4)- 2.4Mb


MySQL PHP API/.../ mysqli::$host_info, mysqli_get_host_info

3.8.21mysqli::$host_info,mysqli_get_host_info

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 themysqlparameter (including the server host name).

Parameters

link

Procedural style only: A link identifier returned bymysqli_connectormysqli_init

Return Values

A character string representing the server hostname and the connection type.

Examples

Example 3.48$mysqli->host_infoexample

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