<?php
mysqli_report(MYSQLI_REPORT_OFF);
/* @ est utilisé pour supprimer les avertissements */
$mysqli = @new mysqli('localhost', 'fake_user', 'wrong_password', 'does_not_exist');
if ($mysqli->connect_error) {
/* Use your preferred error logging method here */
error_log('Connection error: ' . $mysqli->connect_error);
}
<?php
mysqli_report(MYSQLI_REPORT_OFF);
/* @ est utilisé pour supprimer les avertissements */
$link = @mysqli_connect('localhost', 'fake_user', 'wrong_password', 'does_not_exist');
if (!$link) {
/* Use your preferred error logging method here */
error_log('Connection error: ' . mysqli_connect_error());
}