asset.php 299 B

1234567891011121314
  1. <?php require_once "../utilities/index.php" ?>
  2. <?php
  3. $file = "../assets/" . basename($_GET["file"]);
  4. if (!file_exists($file))
  5. return http_response_code(404);
  6. $data = file_get_contents($file);
  7. $mime = get_mime_type($_GET["file"]);
  8. header("Content-Type: " . $mime);
  9. echo $data;
  10. ?>