commit 3f82c916ea04fd41310725e4e15f1e9ee148587a Author: Kilian Kurt Hofmann Date: Fri Apr 26 11:21:08 2024 +0200 Initial Commit diff --git a/configs/.htaccess b/configs/.htaccess new file mode 100644 index 0000000..54aa684 --- /dev/null +++ b/configs/.htaccess @@ -0,0 +1,2 @@ +DENY FROM ALL +ALLOW FROM 127.0.0.1 \ No newline at end of file diff --git a/configs/database.php b/configs/database.php new file mode 100644 index 0000000..27b07e0 --- /dev/null +++ b/configs/database.php @@ -0,0 +1,15 @@ + false)); + + $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); + + return $db; +} +?> diff --git a/configs/db.ini b/configs/db.ini new file mode 100644 index 0000000..788d249 --- /dev/null +++ b/configs/db.ini @@ -0,0 +1,5 @@ +[ZEDAT] +host = usersql.zedat.fu-berlin.de +user = khofmann-sql +passwd = xz8c7m7p +database = khofmann-db1 diff --git a/configs/index.php b/configs/index.php new file mode 100644 index 0000000..4eb81e8 --- /dev/null +++ b/configs/index.php @@ -0,0 +1,16 @@ +prepare($query); +$stmt->execute(); +$result = $stmt->fetch(PDO::FETCH_ASSOC); + +echo json_encode($result); +?> \ No newline at end of file