From: Aaron A. <li...@fr...> - 2006-03-16 22:50:40
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have no way to currently test old IE browsers. But it worked in Firefox, Mozilla, Netscape on both PC and Mac. It also works in safari on the mac. - -- Aaron Axelsen li...@fr... Great hosting, low prices. Modevia Web Services LLC -- http://www.modevia.com Matthew Gregg wrote: > Nice! Does this work with older IE and non-IE browsers? > > On 3/16/06, *Aaron Axelsen* <li...@fr... > <mailto:li...@fr...>> wrote: > > The problem appears to be that IE requires more header content. I > have created a patch against the latest cvs and attached it to this > email. > > Adding the following to the header solves the IE issues: > > header("Pragma: public"); header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0, > pre-check=0"); header("Cache-Control: private",false); > > -- Aaron Axelsen li...@fr... <mailto:li...@fr...> > > Great hosting, low prices. Modevia Web Services LLC -- > http://www.modevia.com > > > > Aaron Axelsen wrote: >> I have tested this on all mac and pc browsers, the problem only >> exists in the latest version of IE. I currently do not have the >> means to test on older versions of IE. > >> This leads me to believe Microsoft patched something that is >> breaking this. > >> -- Aaron Axelsen li...@fr... <mailto:li...@fr...> > >> Great hosting, low prices. Modevia Web Services LLC -- >> http://www.modevia.com > > > >> Aaron Axelsen wrote: >>>> Whenever I try to export survey data in IE, i get an error >>>> saying Internet Explorer cannot download the file from the >>>> server. >>>> >>>> I am running version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519 >>>> >>>> Does anyone else have this problem with the latest updates on >>>> windows xp? If you do not have this problem, what version >>>> of IE running? >>>> >>>> >>>> ------------------------------------------------------- This >>>> SF.Net email is sponsored by xPML, a groundbreaking scripting >>>> language that extends applications into web and mobile >>>> media. Attend the live webcast and join the prime developer >>>> group breaking into this new coding territory! >>>> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > >>>> _______________________________________________ phpESP-devel >>>> mailing list php...@li... > <mailto:php...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/phpesp-devel >>>> > >> ------------------------------------------------------- This > SF.Net >> email is sponsored by xPML, a groundbreaking scripting language >> that extends applications into web and mobile media. Attend the >> live webcast and join the prime developer group breaking into > this >> new coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > >> _______________________________________________ phpESP-devel >> mailing list php...@li... > <mailto:php...@li...> >> https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > --- admin/include/where/download.inc 2005-08-01 > 11:12:55.000000000 -0500 +++ > ../../phpESP/admin/include/where/download.inc 2006-03-16 > 13:05:20.000000000 -0600 @@ -51,22 +51,33 @@ } } > > + // default to csv_full_header $type = isset($_GET['type']) > ? $_GET['type'] : 'csv_full_header'; > > - // default to csv_full_header + // common headers + > function printCommonHeaders() { + header("Pragma: > public"); + header("Expires: 0"); + > header("Cache-Control: must-revalidate, post-check=0, > pre-check=0"); + header("Cache-Control: private",false); > + header("Content-Transfer-Encoding: ascii"); + } > + switch($type) { case 'spss': //NOT FULLY IMPLEMENT YET - > header("Content-Transfer-Encoding: ascii"); - > header("Content-Disposition: attachment; filename=$name.por"); - > header("Content-Type: application/txt"); + > printCommonHeaders(); + header("Content-Type: > text/comma-separated-values"); + > header("Content-Disposition: attachment; filename={$name}.csv"); > $output = survey_generate_results($type, $sid); - //Do > something with output + foreach ($output as $row ) { + > echo(implode(',', $row) . "\r\n"); + } break; > > case 'xml': //NOT FULLY IMPLEMENT YET - > header("Content-Transfer-Encoding: ascii"); + > printCommonHeaders(); header("Content-Disposition: attachment; > filename=$name.xml"); header("Content-Type: text/xml"); $output = > survey_generate_results($type, $sid); @@ -75,7 +86,7 @@ > > case 'tab': // TAB - header("Content-Transfer-Encoding: > ascii"); + printCommonHeaders(); > header("Content-Disposition: attachment; filename=$name.txt"); > header("Content-Type: text/tab-separated-values"); $output = > survey_generate_results($type, $sid); @@ -86,7 +97,7 @@ > > default: // CSV, csv_full_header old method, csv_short_header new > method - header("Content-Transfer-Encoding: ascii"); + > printCommonHeaders(); header("Content-Disposition: attachment; > filename=$name.csv"); header("Content-Type: > text/comma-separated-values"); $output = > survey_generate_results($type, $sid); > > > > > >> -- D'oh! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEGeu8uucONIvD0AMRAlHUAKCrP/xqlHGRRIJCqNM9OjUcE4LyIgCgsGzB 4CzKxEDaM7BKKGqkUB79H+Y= =CigZ -----END PGP SIGNATURE----- |