From 036c8f04f2a154e01c749dba4f1a69c564e423f6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 12 Sep 2020 17:18:08 +0300 Subject: add some basic startup sanity checks --- common.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 common.php (limited to 'common.php') diff --git a/common.php b/common.php new file mode 100644 index 0000000..367ae55 --- /dev/null +++ b/common.php @@ -0,0 +1,26 @@ +query("SELECT id FROM epube_users LIMIT 1"); + + if (!$res) { + die("Test query failed, is schema installed? (sqlite3 " . SCRATCH_DB . "< schema.sql)"); + } + + } catch (Exception $e) { + die($e); + } + +} \ No newline at end of file -- cgit v1.2.3