You are here: Re: [PHP] downloading file and displaying HTML « PHP « IT news, forums, messages
Re: [PHP] downloading file and displaying HTML

Posted by Richard Lynch on 01/20/05 21:38

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация