commit
This commit is contained in:
10
connect.php
Normal file
10
connect.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
require_once("config_db.php");
|
||||
try {
|
||||
$db = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME", $DB_USER, $DB_PASSWORD);
|
||||
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
} catch(Exception $e) {
|
||||
header("Location: 500.php");
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user