firts commit
This commit is contained in:
20
config/db.php
Normal file
20
config/db.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
// Exceptions PHP-MSQLI
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
|
||||
try {
|
||||
// Create Connection
|
||||
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
|
||||
|
||||
// Connections Successfully
|
||||
if(DB_DEBUG == "yes"){
|
||||
echo "Connected successfully";
|
||||
}
|
||||
} catch (mysqli_sql_exception $e) {
|
||||
// Access Deny
|
||||
include(PAGES_FOLD . "db-error.php");
|
||||
|
||||
|
||||
die();
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user