diff options
| author | horus | 2026-01-01 23:19:05 +0100 |
|---|---|---|
| committer | horus | 2026-01-01 23:19:05 +0100 |
| commit | 746bd05d648780cff2dc476b0522619b3f9d89aa (patch) | |
| tree | 5c2d0b296bb58e892dd4e5d62fb53f69bb016e34 /db_config.php | |
| download | Savoy-746bd05d648780cff2dc476b0522619b3f9d89aa.tar.gz | |
init
Diffstat (limited to 'db_config.php')
| -rw-r--r-- | db_config.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db_config.php b/db_config.php new file mode 100644 index 0000000..d674004 --- /dev/null +++ b/db_config.php @@ -0,0 +1,13 @@ +<?php +$host = '192.168.122.1'; +$dbname = 'savoy'; +$username = 'savoy'; + +require_once __DIR__ . '/db_passwd.php'; + +try { + $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $username, $password); + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +} catch(PDOException $e) { + die("DB-Verbindung fehlgeschlagen: " . $e->getMessage()); +} |
