Re: Closing my Window after Download
| From: | John Nichel | Date: | Tue, 24 Aug 2004 18:09:33 +0000 |
| Subject: | Re: Closing my Window after Download | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194612@lists.php.net to get a copy of this message | ||
PHP Junkie wrote:
Ave, The browser window which launched the Save As window...PHP cannot do this. You'll have to use JavaScript in the browser window. Something like.... <?php $file = "$P/$F"; header("Content-Description: File Transfer"); header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".basename($file)); @readfile($file); ?> <script language="JavaScript"> window.close(); </script> -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com