use central include file
[stapibas.git] / www / www-header.php
diff --git a/www/www-header.php b/www/www-header.php
new file mode 100644 (file)
index 0000000..f42ebc7
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+namespace stapibas;
+header('HTTP/1.0 500 Internal Server error');
+header('Content-type: text/plain');
+
+require_once __DIR__ . '/../data/config.php';
+require_once 'stapibas/autoloader.php';
+
+$db = new PDO($dbdsn, $dbuser, $dbpass);
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+?>