Hi all,
I encountered this problem today and I have totally freaked out!
I have created this page from where users may download the latest versions of our applications.
If "Show Extension For Known Types" if selected in the windows configuration, files are shown like atextfile.txt instead of atextfile, as you all know.
If that extension is not registered, eg. "afile.aaa" the file is saved on disk as "afile.aaa..aaa" instead of "afile.aaa"!Of course if you download "runme.exe" it is be saved just fine.
I have used various ways to tell the browser how to download this kind of file, like
1)
Header("Location: http://www.bla.com/afile.aaa");
2)
Header("Content-type: application/force-download");
Header("Content-Disposition: attachment; filename=afile.aaa");
readfile(http://www.bla.com/afile.aaa);
3)2)
Header("Content-type: application/octet-stream");
Header("Content-Disposition: attachment; filename=afile.aaa");
readfile(http://www.bla.com/afile.aaa);
4)and last but not least:
echo '<a href= "http://www.bla.com/afile.aaa">';
Could anyone PLEASE enlighten me on this? it is REALLY URGENT!
Thanks,
Kat :-(