note 49800 added to function.ob-end-clean

From: Date: Wed, 09 Feb 2005 02:14:13 +0000
Subject: note 49800 added to function.ob-end-clean
Groups: php.notes 
Request: Send a blank email to php-notes+get-84696@lists.php.net to get a copy of this message
This may be posted elsewhere, but I haven't seen it. To run a progress indicator while the program is running without outputting the output buffer, the following will work: echo "<p>Search running. Please be patient. . ."; $output = "<p>FileList: </p>\n"; if (is_dir($dir)) { $dh = opendir($dir); while (($fd = readdir($dh)) != false) { echo " ."; ob_start(); echo $fd; $output .= ob_get_contents(); ob_end_clean(); } } echo "</br>Search Complete!</p>\n"; echo $output; The program will continue to print the " ." without printing the file list. Then the "Search Complete" message will print followed by the buffered file list. ---- Manual Page -- http://www.php.net/manual/en/function.ob-end-clean.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49800 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49800&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49800&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49800&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49800&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49800&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49800&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84696) next »