aboutsummaryrefslogtreecommitdiff
path: root/_setup.php
diff options
context:
space:
mode:
Diffstat (limited to '_setup.php')
-rwxr-xr-x_setup.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/_setup.php b/_setup.php
new file mode 100755
index 0000000..8494d89
--- /dev/null
+++ b/_setup.php
@@ -0,0 +1,17 @@
+<?php
+# init file to set up the database
+# rename this file in "setup.php"
+# TODO: pretty html
+
+$db = new db();
+$db->createTables();
+$db->close();
+
+echo "<p>Successfully created the database.</p>";
+
+# rename this file to avoid setting up the tables twice
+if ( ! rename(ABSPATH . 'setup.php', ABSPATH . '_setup.php') )
+ echo "Please remove setup.php from your webserver root directory.";
+else
+ echo "Renamed this file to '_setup.php'.";
+exit;