Answer the question
In order to leave comments, you need to log in
How to send gzip xml file via PHP?
Greetings.
Explain why a gzip file sent with
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . basename($fp_gz));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($fp_gz));
ob_clean();
flush();
readfile($fp_gz);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question