Hi all
I have a script that forces download of a file. It is pretty standard and it is a combination of code from this site and other sites ... the main bit is...
header ("Content-type: application/unknown");
header ("Content-Length: ".filesize($fname));
header ("Content-Disposition: attachment; filename=\"$fname\"");
header ("Content-Description: ".$fname);
header ("Content-Transfer-Encoding: binary");
header ("Expires: 0");
// open the file for reading and start dumping it to the browser
if($fp = fopen($lfname, "r")) {
while(!feof($fp)) {
echo fgets($fp, 4096);
}
}
fclose($fp);
exit();
Problem 1: is that after download the animated pointer remains after the file download is completed and only goes away after you click on another link or button.
Problem 2: in the save as dialog the save as type always shows 'netzip file' ... the only other option is . ... Is this normal or can I control what types are available?
Problem 3: is that if I select 'open file from current location' I get the 'file download' dialog a second time. then when you select open file ... in the second dialog it then downloads!
None are crucial problems ..just messy!
I am still testing before uploading to the public webserver and would like to know if this behavior is normal or a problem my end.
I am running IE5 + Apache 1.3.12 (Win32)
Any comments appreciated.
TIA