diff php/config.php @ 3120:53d701288da5

Create new php config to allow saves to be stored outside of web scope
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Wed, 18 Jul 2018 16:47:07 +0100
parents
children 8bef85957a2f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/php/config.php	Wed Jul 18 16:47:07 2018 +0100
@@ -0,0 +1,16 @@
+<?php
+function getSaveLocation() {
+    if (isset($_ENV["WAET_SAVES_LOCATION"])) {
+        return $_ENV["WAET_SAVES_LOCATION"];
+    } else {
+        return "../saves/";
+    }
+}
+function getTestLocation() {
+    if (isset($_ENV["WAET_TEST_LOCATION"])) {
+        return $_ENV["WAET_TEST_LOCATION"];
+    } else {
+        return "../tests/";
+    }
+}
+?>
\ No newline at end of file