[nycphp-talk] Headers problem/Firebird
Keith Richardson
keith.richardson at thompsonhealth.com
Fri Dec 12 07:34:25 EST 2003
to force a download for a warcraft 3 replay file through my download script
I use:
header("Content-type: application/force-download");
header("Content-Disposition: filename=\"".$replayid." - $filename\"");
$path = "/home/war3com/public_html/replays/files/".$replayid.".w3g";
$fp = fopen($path, 'r');
fpassthru($fp);
fclose($fp);
This seems to always force a download, and I read that it will force it no
matter what extention it is.
-----Original Message-----
From: talk-bounces at lists.nyphp.org
[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff Siegel
Sent: Thursday, December 11, 2003 8:02 PM
To: NYPHP Talk
Subject: [nycphp-talk] Headers problem/Firebird
Just wondering why the headers below work well with IE but not with
Firebird. While in both cases they prompt the user to save a file to
disk, in the case of Firebird it tries to save the file (named
partslist.csv) with a "php" extension.
Header("Content-type: text/csv\n");
Header("Content-Disposition: attachment; filename=\"$sFileName\"");
Header("Pragma: no-cache");
Header("Expires: 0");
Jeff Siegel
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk
More information about the talk
mailing list