Header.inc 336 B

123456789101112131415161718192021222324
  1. <?php
  2. class Header
  3. {
  4. public function pageNotFound()
  5. {
  6. header("HTTP/1.0 404 Not Found");
  7. }
  8. public function serverError()
  9. {
  10. header("HTTP/1.1 500 Internal Server Error");
  11. }
  12. public function location($url)
  13. {
  14. header("Location: " . $url);
  15. }
  16. public function jsonContent()
  17. {
  18. header('Content-Type: application/json');
  19. }
  20. }