Re: downloading a file using headers
| From: | Jason Sheets | Date: | Thu, 31 Jul 2003 01:53:16 +0000 |
| Subject: | Re: downloading a file using headers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157628@lists.php.net to get a copy of this message | ||
You could use an iframe or you could turn on output buffering, when output buffering is enabled you can send headers after normal output has been sent. Just do ob_start(); at the top of your script. Not the most elegant way of doing it but it would work and not require you to use an iframe.
Jason
Amanda McComb wrote:
I have a page that queries the database then uses the data to build an excel spreasheet. THat spreadsheet is downloaded according to info in the headers. My manager wants to put the page inside of another HTML page to make it prettier, but then it breaks because headers are already written (it's included in the other HTML page). It works fine on it's own, but he really wants it in that page. He wants to know if there is a way to trick it into working. Any ideas? I can post the code if necessary, but it's loooong and messy. THanks, Amanda