From: <Mar...@fi...> - 2006-03-17 08:56:26
|
Howdy Aaron, for Internet Explorer: When using an attachement Content-Dispositon, it seems the following=20 headers are also required: header("Cache-Control: cache, must-revalidate");=20 header("Pragma: public"); If you have Cache-Control as no-cache, IE fails. The header "Content-Type: application/force-download" is a hack as wel,=20 but fixed it for IE and FF. ---- START phpESP/admin/include/where/download.inc ---- default: // CSV, csv=5Ffull=5Fheader old method, csv=5Fshort=5Fheader ne= w=20 method header("Cache-Control: cache, must-revalidate"); header("Pragma: public"); header("Content-Type: application/force-download"); header("Content-Disposition: attachment;=20 filename=3D$name.csv"); $output =3D survey=5Fgenerate=5Fresults($type, $sid); foreach ($output as $row ) { echo(implode(',', $row) . "\r\n"); } I have done several tests and those two lines fixed my script. (It was=20 trying to download a .csv) ---- END phpESP/admin/include/where/download.inc ---- Cheers Martin php...@li... schrieb am 07.03.2006 18:45:30: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 >=20 > >> Patches against current CVS would be graciously accepted. > > > > Maybe I can find a PHP hacker here who'd be interested. >=20 > I think the main problem is finding someone who has time :). >=20 >=20 >=20 > - -- Aaron > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >=20 > iD8DBQFEDca6uucONIvD0AMRAv0+AJ90PpWHi4Ld6qoHibXcJV6WfQtJjACeNc67 > i9VSNo73rRBYQ+NYR3uX8G8=3D > =3Duyq3 > -----END PGP SIGNATURE----- >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting=20 language > that extends applications into web and mobile media. Attend the live=20 webcast > and join the prime developer group breaking into this new coding=20 territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > phpESP-general mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-general |