Re: header gives different results with post

From: Date: Mon, 09 Dec 2002 20:51:23 +0000
Subject: Re: header gives different results with post
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-127551@lists.php.net to get a copy of this message
The actual code echoes a buffer of comma separated values. I just shorten it since it doesn't work for post even with these few headers and the word test echoed. At 11:28 AM 12/9/2002 -0800, Evan Nemerson wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Are you trying to attach an additional results.csv, or are you trying to name the output (ie "test")??? If you're trying to name the output, changing Content-Disposition: attachment;filename="results.csv" to Content-Disposition: inline;filename="results.csv" If that doesn't work, peruse RFC 2183. On Monday 09 December 2002 08:18 am, Ellen Cyran wrote: When I submit a post to the following page rather than a get the download screen in IE 5.5SP2 appears twice. Is there any way around this? I definitely need to use post since the length of the string being sent is fairly long. <?php
    header("Content-type: application/octet-stream");
    header('Content-Disposition: attachment;filename="results.csv"');// Try
to name the output file
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: '.gmdate("D, d M Y H:i:s").' GMT'); // always
modified
    header("Cache-Control: no-store, no-cache, must-revalidate");  //
HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache"); // HTTP/1.0
    /*$nocache = 'Cache-Control: no-cache'; */ // HTTP/1.1
    //header($nocache);
    header('Content-Transfer-Encoding: binary'); // Binary data
    echo "test";
?> Thanks. - -- Sell a man a fish, he eats for a day, teach a man how to fish, you ruin a wonderful business opportunity. - -Karl Marx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE99O8A/rncFku1MdIRAo24AKCy/2Swq6lb6iIOQO96cZWl2lSdvwCdEOBZ ydQE/q/JZ9CIQNLRoSW3YOE= =ItM0 -----END PGP SIGNATURE-----


« previous php.general (#127551) next »