See Also
Stats description
20.7.3.9.23. mysqli::$host_info,
Copyright 1997-2012 the PHP Documentation Group. [2230]
•
mysqli::$host_info
mysqli_get_host_info
Returns a string representing the type of connection used
Description
Object oriented style
string
mysqli->host_info ;
Procedural style
string mysqli_get_host_info(
mysqli link);
Returns a string describing the connection represented by the
host name).
Parameters
link
Return Values
A character string representing the server hostname and the connection type.
Examples
Example 20.126.
Object oriented style
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
/* print host information */
printf("Host info: %s\n", $mysqli->host_info);
/* close connection */
$mysqli->close();
?>
Procedural style
MySQL Improved Extension (Mysqli)
mysqli_get_host_info
Procedural style only: A link identifier returned by
mysqli_connect
$mysqli->host_info
link
or
mysqli_init
example
2381
parameter (including the server
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers