diff options
Diffstat (limited to 'www/common.php')
-rw-r--r-- | www/common.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/www/common.php b/www/common.php index 52971eb..a86d7b7 100644 --- a/www/common.php +++ b/www/common.php @@ -19,10 +19,14 @@ function ConnectDB() { + global $config; + $pdo = new PDO("mysql:host=localhost;dbname={$config["dbname"]}", $config["dbuser"], $config["dbpassword"]); + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $pdo; } + ?> |