Re: flush output error

From: Date: Thu, 19 Dec 2002 07:52:08 +0000
Subject: Re: flush output error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-128813@lists.php.net to get a copy of this message
sorry about the false alarm , if you go here u will see a working example http://galleries.dyndns.org:1023/progress.php i had to add both flush functions together to work , obviosuly flsuh is not emptying the buffer within a loop, is this still a bug ? flush(); ob_flush(); "Wico De Leeuw" <wico-php-general@newcorps.biz> wrote in message news:5.1.0.14.0.20021218105135.00ab7050@wheresmymailserver.com... > At 20:41 18-12-02 +1100, you wrote: > >hi guys i have a little problem with flushing the buffer output, in this > >loop it should be downloading a file and changing the progress of a progress > >bar, although it waits until the shell_exec of all the files are done and > >then flushes the buffer which will start @ 95% , so it wont start until > >shell_exec is finished , is this a bug ? > > php can't multitask, so it's not a bug > what you can try: > > page1: (start process) > put an ignore_user_abort on it > put a header location on it to page2 > start the command and let it write to a file where it is > > page 2 : > read the file and display a processbar > (with javascript or meta refresh) > when done goto page3 > > page3: > continue > > > > >foreach ($filename as $file){ > > shell_exec("curl -O ".$url.$file); > > //shell_exec("wget ".$url.$file); > > //echo $file; > > > >$bar->progressbar_percentage($i,$filename,'NewWin','Percentage','Downloadin g > >'.$file); > > $i++; > > } > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#128813) next »