jundolor

Monday, May 03, 2010

PHP Export Script

# This line will stream the file to the user rather than spray it across the screen
header("Content-type: application/octet-stream");

# replace excelfile.xls with whatever you want the filename to default to
header("Content-Disposition: attachment; filename=excelfile.xls");
header("Pragma: no-cache");
header("Expires: 0");

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home