summaryrefslogtreecommitdiff
path: root/src/DTS/Functions.php
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2021-10-13 21:51:07 +0100
committerDavid T. Sadler <davidtsadler@googlemail.com>2021-10-13 21:51:07 +0100
commitcbaedbc5251f3b127bd81242d1344c0cd3e56e0c (patch)
treef76273742992d8f06983fd5d6fef37efc85a2c07 /src/DTS/Functions.php
parent2ab5661583d74b03c86bb4f437616bb634d9c4fc (diff)
Implemente redirects
Diffstat (limited to 'src/DTS/Functions.php')
-rw-r--r--src/DTS/Functions.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/DTS/Functions.php b/src/DTS/Functions.php
index d7ca835..2101cda 100644
--- a/src/DTS/Functions.php
+++ b/src/DTS/Functions.php
@@ -16,3 +16,8 @@ function respondAndExit(int $responseCode, string $header, string $body = '', ar
exit();
}
+
+function redirectAndExit(string $location): void
+{
+ respondAndExit(302, 'Found', '', ["Location: $location"]);
+}