I have files of different extensions, So how can I define multiple extensions in one header. for example
header("Content-type: application/xml");
header("Content-type: application/txt");
Is there any possibilities are there, to define in a single header something like this
header("Content-type: application/xml txt");
Thanks in advance for your suggestions
If you want in downloading any type of file you can just use application/octet-stream.
header('Content-Type: application/octet-stream');
// for example this will download any type of file
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
readfile($file);