note 54713 deleted from function.flush by danbrown

From: Date: Sat, 14 Feb 2009 06:06:56 +0000
Subject: note 54713 deleted from function.flush by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150657@lists.php.net to get a copy of this message
Note Submitter: Colin at ColinsRealm dot Com ---- I find that you need to open your ob for it to print . Heres my example that works in IE . Yes - the strings need to be long for it to flush ... <?php ob_start(); for($i = 1; $i <= 10; $i++){ $sourceName = 'filetoupload' . $i; $imageArray = array(); if(!is_uploaded_file($_FILES[$sourceName]['tmp_name'])) { $imageArray[$num-1] = NULL; $message="Image $i does not exist (has not been prompted for upload)<br/>"; } else { move_uploaded_file($_FILES[$sourceName]['tmp_name'], "temporary/$sourceName"); $message = "Image $i has been uploaded to the server"; } echo $message; flush(); ob_flush(); usleep(300); } ob_end_flush(); ?>

« previous php.notes (#150657) next »