output buffering problem

From: Date: Tue, 17 Dec 2002 21:15:21 +0000
Subject: output buffering problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-92567@lists.php.net to get a copy of this message
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 ?

« previous php.dev (#92567) next »