Re: downloading file and displaying HTML

From: Date: Thu, 20 Jan 2005 19:38:14 +0000
Subject: Re: downloading file and displaying HTML
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-206873@lists.php.net to get a copy of this message
Michael Grunewalder wrote: > I have a list of files that are outside the web root and can't be accessed > with a > URL directly. > If a user clicks the link for a file on the download page, I would like to > send > that file to the browser as a download *and* display HTML in the browser > window. > How can I do that - if it is possible at all. There's nothing in the HTTP protocol to allow you to send two answers to one request. One hack that will work on MOST current browsers is to put a: <META HTTP-EQUIV="REFRESH" CONTENT="0;URL=http://example.com/download.php"> in your HTML, so the browser will then redirect them to the download. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#206873) next »