You are here: Re: check if file was downloaded « PHP Programming Language « IT news, forums, messages
Re: check if file was downloaded

Posted by Rik on 02/23/07 15:55

On Fri, 23 Feb 2007 16:31:57 +0100, Hendri Adriaens
<spotjeREMOVE@THISgmail.com> wrote:

>> I'd use a combo of:
>>
>> ignore_user_abort(true);
>> readfile();
>> //just for those fast downloads of small files sleep
>> //tinker with it
>> sleep(2);
>> if(!user_aborted()){
>> unlink();
>> } else {
>> //perhaps some logging, which is why I set the ignore_user_abort() to
>> true.
>> }
>
> Thanks, but unfortunately, this doesn't work. Now, the remaining part of
> the
> code is never executed. Also not when the file is saved or opened. And I
> should note that the sleep only delays the save dialog to appear, so it
> seems to be executed before readfile(), while I did put them in the right
> order.

Silly me.... replace user_aborted() with connection_aborted()....
--
Rik Wasmus

 

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

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