📅  最后修改于: 2022-03-11 14:53:56.207000             🧑  作者: Mango
$conn = mysqli_connect( '', '', '', '');
if (!$conn) {
// whatever processing you want to do upon error in connection
// like log error or send an email to admin
// I am just printing the error at the moment.
echo mysqli_connect_errno() . ":" . mysqli_connect_error();
exit;
}