Fix bug 484
parent
0f42a68461
commit
9d170fea87
|
@ -4,11 +4,14 @@ error_reporting(0);
|
||||||
date_default_timezone_set('Asia/Shanghai');
|
date_default_timezone_set('Asia/Shanghai');
|
||||||
|
|
||||||
include "get_mysql_credentials.php";
|
include "get_mysql_credentials.php";
|
||||||
$con = mysqli_connect("localhost", $mysql_username, $mysql_password, "lrr");
|
try {
|
||||||
|
$con = mysqli_connect("localhost", $mysql_username, $mysql_password, "lrr");
|
||||||
|
} catch (mysqli_sql_exception $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
// Check database connection
|
// Check database connection
|
||||||
if (mysqli_connect_errno()) {
|
if (mysqli_connect_errno()) {
|
||||||
echo "Failed to connect to MySQL: " . mysqli_connect_error();
|
exit();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue