[nycphp-talk] Re: Downloading a CSV file
Jeff Siegel
jsiegel1 at optonline.net
Wed Sep 8 10:14:53 EDT 2004
Hope it works for you.
Jeff
Faber Fedor wrote:
> On 07/09/04 23:04 -0400, Jeff Siegel wrote:
>
>>Here's some pseudo code to get you started. It should prompt the user
>>with a dialog box to save the file.
>
>
> That's what I'm looking to do!
>
>
>>However, keep in mind that if you
>>have really large datasets (40,000 rows+) this may not work
>
>
> I was thinking more along the lines of 50 rows. :-)
>
>
>>Header("Content-type: text/csv\n",true);
>>Header("Content-Disposition: attachment; filename=myfilename.csv",true);
>>
>>Header("Pragma: no-cache",true);
>>Header("Expires: 0",true);
>>print $csv_output;
>>exit;
>
>
> That's it! Thanks!
>
>
More information about the talk
mailing list