CGI, Zip and Downloading

John Evans jtevans at kilnar.com
Thu Jun 5 19:40:46 CDT 2003


On Wed, 4 Jun 2003, Keary Suska wrote:

> Otherwise, you can instruct the browser on how to handle the file, which
> should override default handlers:
> 
> print qq(Content-type: text/tab-separated-values;name="foo.txt"\n);
> print qq(Content-Disposition: attachment;filename="foo.txt"\n\n);
> 
> Note that some versions of IE are buggy with handling Content-Disposition.
> 

Keary,
	Once again your knowledge is outstanding! Glad you're around. The 
Content-Disposition works wonderfully. Just simply built out the array 
and.....

print "Content-disposition: attachment;filename=\"contacts.txt\"\n\n";
foreach $c (@Contacts) {
  print "$c\n";
}

Thanks again!

-- 
John Evans
http://jtevans.kilnar.com/

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s++:- a- C+++>++++ ULSB++++$ P+++$ L++++$
E--- W++ N+ o? K? w O- M V PS+ !PE Y+ PGP t(--) 5-- X++(+++)
R+++ tv+ b+++(++++) DI+++ D++>+++ G+ e h--- r+++ y+++
------END GEEK CODE BLOCK------




More information about the Pikes-peak-pm mailing list