Re: Closing my Window after Download
| From: | PHP Junkie | Date: | Tue, 31 Aug 2004 12:15:24 +0000 |
| Subject: | Re: Closing my Window after Download | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195268@lists.php.net to get a copy of this message | ||
Ave,
I didn't quite understand what you meant.
The kind of files being saved by this script range from ZIP files to DBF
files to JPG files etcetera. Where will the HTML be in those saved files?
Any suggestions on what I need to do to make this work?
On 8/30/04 8:31 PM, "Curt Zirzow" <php-general@zirzow.dyndns.org> wrote:
> * Thus wrote PHP Junkie:
>> Ave,
>>
>> It still doesn't work. Not only that, I put up a "close window" button in
>> the page and even that doesn't show up. Although that's still not what I
>> want. What I want is the window to close automatically.
>>
>> Here's my page:
>>
>> <?php
>> $file = "$P/$F";
>> header("Content-Description: File Transfer");
>> header("Content-Type: application/force-download");
>> header("Content-Disposition: attachment; filename=".basename($file));
>> @readfile($file);
>> ?>
>> <html>
>> <head>
>> <title>D/L Window</title>
>> <script language="javascript">
>> function close_opener()
>
> Take a look at the end of the file you saved, you'll see your html
> there.
>
> Curt