From cbaedbc5251f3b127bd81242d1344c0cd3e56e0c Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Wed, 13 Oct 2021 21:51:07 +0100 Subject: Implemente redirects --- src/DTS/Functions.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/DTS/Functions.php') 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"]); +} -- cgit v1.2.3-13-gbd6f