NYCPHP Meetup

NYPHP.org

[nycphp-talk] Headers problem/Firebird

Keith Richardson keith.richardson at thompsonhealth.com
Fri Dec 12 08:29:43 EST 2003


I had a problem with the beta versions of Safari - it was always saving it
as the name of the download script by default, not the filename sent. maybe
its some sort of problem like that? apple ended up fixing it in their final
release.

-----Original Message-----
From: talk-bounces at lists.nyphp.org
[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff Siegel
Sent: Friday, December 12, 2003 8:06 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Headers problem/Firebird


Firebird is not having a problem with getting the file to download. The
interesting thing is that Firebird insists on adding a "php" extension
to the file name when the user is prompted to save the file to disk.

Jeff

Keith Richardson wrote:

> 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
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>

--
Found on the Simpson's Website:
"Ooooooh, they have the internet on computers now!"

_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list