I have a page w/ a Download button to download a .wav file. I used only the following code:
header("Content-type: audio/x-wav");
header("Content-disposition: attachment; filename=".$filename);
header("Content-Transfer-Encoding: binary");
readfile($file);
The wav file is successfully downloaded but does not play; default player says "unsupported format". The downloaded file size is also correct. What could be wrong?
Thanks in advance for any tip/help.