I've got a simple code
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($file_name).'"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache');
header('Content-Length: ' . filesize($file_name));
echo ('test');
ob_clean();
flush();
readfile($file_name);
//var_dump($file_name);
//unlink($file_name);
exit;
But when I'am trying to download file via FF (latest 63 version) it won't download anything. When I look through Fiddler, I saw that there was no actual content, headers only. But from time to time, file downloads somehow. Chrome works well anytime. What could it be? Thank you for your time.
P.S. Running on XAMPP on windows 7 x64