NYCPHP Meetup

NYPHP.org

[nycphp-talk] Creating file for download on the fly?

JeeBak Kim jbkim at cs.pdx.edu
Fri Jul 26 11:34:50 EDT 2002


Hey there,

Another thing I'd add, is how different browsers handle filenames, as in
Kayra's example below.  If, for example, the filename is output.csv, some
will handle it correctly, some will give the name yourscriptname.php, and
worst of all, some versions of MS IE will name it something weird and
random like a3uxe382 (without an extension!)  It'd probably be a good idea
to give explicit instruction to save the resulting output and rename it
with the correct filename/extension.

* Freedman, Tom S. (tfreedma at ubspw.com) [020726 08:21]:
> Thanks everyone!  I was unaware of the Content-disposition header.  I'll
> give this a try as soon as I can!
> 
> Thanks again,
> Tom
[snip]

> >-----Original Message-----
> >From: Kayra Otaner [mailto:kayraotaner at yahoo.com]
> >Sent: Friday, July 26, 2002 10:38 AM
> >To: NYPHP Talk
> >Subject: Re: [nycphp-talk] Creating file for download on the fly?
> >
> >
> >Hi, I think this self explaining code helps :
> >
> >header("Content-disposition: filename=$filename.csv");
[snip]



More information about the talk mailing list