Re: Re: output buffering problem

From: Date: Thu, 19 Dec 2002 12:52:17 +0000
Subject: Re: Re: output buffering problem
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-92668@lists.php.net to get a copy of this message
Please ask these questions on the php-general list. --Wez. On Thu, 19 Dec 2002, electroteque wrote: > 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(); > "Electroteque" <daniel@electroteque.org> wrote in message > news:20021217211650.84320.qmail@pb1.pair.com... > > hi guys i have the latest cvs , my function used to work now it doesnt > > > > function > > progressbar_percentage($i,$files,$newwin,$moviename,$status,$sleep=null){ > > if (is_array($files)) $per = $i/count($files); else $per = $i/$files; > > $per = $per*100; > > $buffer = "<script language=\"javascript\">\n"; > > $buffer .= "var > > movie=".$newwin.".document.".$moviename.";\n"; > > $buffer .= "movie.TGotoFrame(\"_root.Status\", 1);\n"; > > $buffer .= "movie.SetVariable(\"_root.Status.processing\", > > \"".$status."\");\n"; > > $buffer .= "movie.TSetProperty(\"_root.Bar\",2, > > ".ceil($per).");\n"; > > $buffer .= "movie.SetVariable(\"_root.Percent.per\", > > \"".ceil($per)." > > %\");\n"; > > $buffer .= "</script>\n"; > > print ($buffer); > > flush(); > > sleep(1); > > } > > > > this i meant to flush on every loop and show a progress percentage > although > > now php wont flush anything until half way through the loop and causes > > javascript errors as it never flushed until too late , what could be the > > problem ? > > > > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.dev (#92668) next »