You are here: Re: Downloads, headers and scripts not finishing... « PHP Programming Language « IT news, forums, messages
Re: Downloads, headers and scripts not finishing...

Posted by Michael Fesser on 10/20/07 19:49

..oO(Dahak)

> This all works fine. The commented out readfile() _also_ worked
>fine, but I've been trying to see how to get past my problem, which
>is:
>
> Once the file is sent to the output stream, the script seems to
>halt.

Correct, that's how it works.

> I want to get the script to continue rendering a 'Thank you for
>downloading...'-type page, but nothing seems to happen after the
>readfile() or fpassthru().

That would be an entirely different thing. The browser requests one
resource and gets one, a ZIP file in this case. For another resource
like an HTML page for example the browser would have to send another
request, because you can't send two resources back at the same. One
request, one response, one resource.

> In practical terms, this is nothing more than an annoyance. The
>end user gets the requested ZIP file, but nothing else can be done in
>the script.

It can't be done in the script because it can't be done in HTTP.

> Other examples I've searched for online seem to imply that script
>execution should continue.

Of course the script execution can continue, but you can't send a second
document back to the browser after the first requested file was sent.

Micha

 

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

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