I have been trying to use readfile($filename) in my scripts to download files from the webserver to the local machine. I have set all the headers correctly, allowing for IE5 & 6 problems, setting content type and size etc. The download dialogue box appears and the filename of the file to be saved is given. When the Save button is pressed the browser thinks about it and saves a file of 0 bytes on the harddisk. It doesn't matter what the file is that I am trying to save or its size - the result is the same.
I have tried this using IE5 and IE 6 on Win2K against a Linux/Apache remote webserver and using IE5 and IE6 on Win2K against Win2000 Advanced Server IIS on local intranet. These combinations all provide the same results - a file of 0 bytes.
I have also tried Netscape and IE6 from a Mac against the Linux/Apache server with the same results.
I have trawled through as many forums/faqs/manuals etc that I can find and nobody seems to be having the same sort of problem. I'm probably being really stupid but has anyone got any ideas?
Thanks
Veggy