Re: Foring a file download *and* page reload
| From: | Marek Kilimajer | Date: | Tue, 02 Sep 2003 08:54:55 +0000 |
| Subject: | Re: Foring a file download *and* page reload | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161431@lists.php.net to get a copy of this message | ||
You can use either a <meta> tag or real header, the later is prefered.
<?php
header('Refresh: 0; url=download.zip');
?>
<html>
<!-- your html page here -->
</html>
The browser loads the page and immediatly goes to another page (download.zip). This page will prompt the Save As dialog.
Jean-Christian IMbeault wrote:
Marek Kilimajer wrote:But because explorer does not support multipart/mixed and it is still the major browser (thought not for long ;), do it this way. Output header('Refresh: 0; url=download.zip'); first and then load the html page with new data blocks.Sorry if the solution is obvious but I can't understand what you mean by using a refresh header. Where and when should I use the header? Can you give a short example? Thanks, Jean-Christian Imbeault