Re: Closing my Window after Download

From: Date: Tue, 31 Aug 2004 00:31:59 +0000
Subject: Re: Closing my Window after Download
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-195231@lists.php.net to get a copy of this message
* 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 -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

« previous php.general (#195231) next »