Simple Route

This commit is contained in:
2024-07-19 15:47:19 +02:00
parent 156d277e77
commit ab1df63788
156 changed files with 13136 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
class Headers
{
public static function json()
{
header('Content-Type: text/html; charset=utf-8');
header("Content-Type: text/json");
}
public static function html()
{
header('Content-Type: text/html; charset=utf-8');
}
public static function redirect(string $newUrl, bool $permanent = FALSE)
{
header('Location: ' . $newUrl, true, $permanent ? 301 : 303);
exit();
}
}