Re: downloading file and displaying HTML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux