UncleRon has asked for the wisdom of the Perl Monks concerning the following question:
Normally the receipient's browser show's the file as 'Label.txt'. However I have a customer that is using XP Home and they keep getting a notice that says the file is a '.cgi'. I have them change the file type to '.txt'. I've tested this little code above on XP Professional and I don't have this problem. Any ideas? Thanks, Ron# # GET THE LABEL FILE # $key = 'Labels'; $file = "$path/labels/$key"; # # SEND THE FILE TO THE BROWSER # print "Content-Disposition: attachment; filename=$key.txt\n"; print "Content-Type: application/octet-stream\n\n"; my $buffer; open (FILE, "$file"); print $buffer while read(FILE, $buffer, 4096); close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Downloading a file to XP Home changes the extenstion
by amonotod (Acolyte) on Oct 17, 2003 at 19:55 UTC | |
|
Re: Downloading a file to XP Home changes the extenstion
by hardburn (Abbot) on Oct 17, 2003 at 19:45 UTC |