summaryrefslogtreecommitdiffstats
path: root/prog/inventar/h.php
diff options
context:
space:
mode:
Diffstat (limited to 'prog/inventar/h.php')
-rw-r--r--prog/inventar/h.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/prog/inventar/h.php b/prog/inventar/h.php
new file mode 100644
index 0000000..2cba303
--- /dev/null
+++ b/prog/inventar/h.php
@@ -0,0 +1,8 @@
+<?php
+header("Content-Security-Policy: script-src 'none'"); // disable js
+$db = new PDO("sqlite:db", null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
+if (!$db)
+ die("db: " . htmlspecialchars($e->getMessage()));
+$ro = new PDO("sqlite:db", null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::SQLITE_ATTR_OPEN_FLAGS => PDO::SQLITE_OPEN_READONLY]);
+if (!$ro)
+ die("ro: " . htmlspecialchars($e->getMessage()));