★ wanayoo — archive 1999 http://www.php.net/manual/function.flush.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Strings
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
Strings
* AddCSlashes
* AddSlashes
* bin2hex
* Chop
* Chr
* chunk_split
* convert_cyr_string
* count_chars
* crc32
* crypt
* echo
* explode
* flush
* get_html_translation_table
* get_meta_tags
* hebrev
* hebrevc
* htmlentities
* htmlspecialchars
* implode
* join
* levenshtein
* ltrim
* md5
* Metaphone
* nl2br
* ob_start
* ob_get_contents
* ob_end_flush
* ob_end_clean
* ob_implicit_flush
* Ord
* parse_str
* print
* printf
* quoted_printable_decode
* quotemeta
* rtrim
* sscanf
* setlocale
* similar_text
* soundex
* sprintf
* strcasecmp
* strchr
* strcmp
* strcspn
* strip_tags
* stripcslashes
* stripslashes
* stristr
* strlen
* str_pad
* strpos
* strrchr
* str_repeat
* strrev
* strrpos
* strspn
* strstr
* strtok
* strtolower
* strtoupper
* str_replace
* strtr
* substr
* substr_count
* substr_replace
* trim
* ucfirst
* ucwords
Manual: flush
View the source code for this pageSearch the site



Previous page
 explode
 Updated
Sat, 12 Aug 2000
get_html_translation_table 
Next page


flush

(PHP3 , PHP4 )

flush -- Flush the output buffer

Description

void flush(void);

Flushes the output buffers of PHP and whatever backend PHP is using (CGI, a web server, etc.) This effectively tries to push all the output so far to the user's browser.


User Contributed Notes: flush


digdan@rmci.net
16-Sep-1999 07:55
I have noticed that this doesn't force IE to display the page(or what is loaded so far), but it does in netscape.


akira@zerodegree.de
14-Feb-2000 02:56
On my system using PHP3 flush is working with netscape AND IE but only when you use print("something"); instead of echo "";


jason@cnpapers.com
23-Mar-2000 11:31
Flush example:


$i = 1;

for($i; $i < 10; $i++){

print"$i
";//($i-break tag)

flush();

sleep(1);

}



On my NS the above example doesn't work without the break tag. Interesting.



john@taalee.com
05-Apr-2000 03:32
A quick hack, is to do System("echo 'hello world'); flush;



jimsmith@wordofnet.com
09-May-2000 06:58
I get flush() to work well with IE5 when I close all of the tables, forms and frames. i.e.

<table><? flush(); ?></table>


won't work, use


<table></table><? flush(); ?>

instead.



matt@mattwenham.co.uk
30-Jun-2000 07:00
Change the above example to:


$i = 1;

for($i; $i < 10; $i++){

print"$i

";

flush();

sleep(1);

}



i.e. paragraphs instead of line breaks.
Works in my IE5 (5.00.2314.1003).



ikoster@exed.nl
28-Jul-2000 01:52
Some sample code:


<HTML>

<BODY>

Welkom to chat room:

<?

flush();

while(10==10) // cool while loop

{

// get here som lines from a dbase or so

// and put in in $tekst



print($tekst);

flush();

}




 About Notes


Previous page
 explode
 Updated
Sat, 12 Aug 2000
get_html_translation_table 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.