Basic Framework

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