Re: Output text status on a long class

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

 



Dan,

Try
echo "some text";
ob_flush() <http://br2.php.net/manual/en/function.ob-flush.php>;
*flush()* ;

also take a look at the documentation at:
http://br2.php.net/manual/en/function.flush.php

Angelo

2008/10/14 Chrome <admin@xxxxxxxxxxxx>

> Hi all
>
> I have a class that takes a while to run and am wanting to push some output
> to the browser while it's doing its stuff.  Is that possible?
>
> Here's what I'd like:
>
> Connecting to server... Done!
> Retrieving categories... Done!
> ...
>
> All I can get it to do is output all of the text at the end of the script
>
> A voice in my head says that outputting all of the text at the end of the
> script is the only way to do it.  Then another voice says but there must be
> a way! :)
>
> I did try a quick test of buffering the text then explicitly flushing the
> buffer but it didn't seem to work
>
> I know this seems pointless but I'm anticipating that the users will be
> confused (which would be a surprise </sarcasm>) and attempt to abort/bugger
> off somewhere else
>
> Thanks in advance!
>
> Dan
>
>
> --
> 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