Re: flush output error

From: Date: Wed, 18 Dec 2002 09:51:40 +0000
Subject: Re: flush output error
Groups: php.general 
Request: Send a blank email to php-general+get-128671@lists.php.net to get a copy of this message
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','Downloading '.$file);
     $i++;
} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#128671) next »