The mysqli_dump_debug_info() function dumps debugging info into the log.
PHP mysqli_dump_debug_info() Function has the following syntax.
mysqli_dump_debug_info(connection);
Parameter | Is Required | Description |
---|---|---|
connection | Required. | A link identifier returned by mysqli_connect() or mysqli_init() |
It returns TRUE on success or FALSE on failure.
The following code dumps debug info into the log.
<?php/* w w w . j av a2s . co m*/
$con=mysqli_connect("localhost","my_user","my_password","my_db");
if (mysqli_connect_errno($con)){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_dump_debug_info($con);
mysqli_close($con);
?>