diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2021-10-13 21:51:07 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2021-10-13 21:51:07 +0100 |
| commit | cbaedbc5251f3b127bd81242d1344c0cd3e56e0c (patch) | |
| tree | f76273742992d8f06983fd5d6fef37efc85a2c07 /src/DTS/Functions.php | |
| parent | 2ab5661583d74b03c86bb4f437616bb634d9c4fc (diff) | |
Implemente redirects
Diffstat (limited to 'src/DTS/Functions.php')
| -rw-r--r-- | src/DTS/Functions.php | 5 |
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"]); +} |
