'text/css', 'js' => 'application/javascript', 'woff' => 'font/woff', 'woff2' => 'font/woff2', 'ttf' => 'font/ttf', 'otf' => 'font/otf', 'eot' => 'application/vnd.ms-fontobject', 'svg' => 'image/svg+xml', ]; $mimeType = $mimeTypes[$ext] ?? (mime_content_type($filePath) ?: 'application/octet-stream'); header('Content-Type: ' . $mimeType); readfile($filePath);