This commit is contained in:
2024-07-19 13:05:21 +02:00
parent 88f535a1ed
commit 156d277e77
10 changed files with 229 additions and 71 deletions
+3 -3
View File
@@ -2,18 +2,18 @@
class Headers
{
static function json()
public static function json()
{
header('Content-Type: text/html; charset=utf-8');
header("Content-Type: text/json");
}
static function html()
public static function html()
{
header('Content-Type: text/html; charset=utf-8');
}
static function redirect(string $newUrl, bool $permanent = FALSE)
public static function redirect(string $newUrl, bool $permanent = FALSE)
{
header('Location: ' . $newUrl, true, $permanent ? 301 : 303);