This shows you the differences between two versions of the page.
uphp:functions:flush [2017/05/09 10:02] jeff |
uphp:functions:flush [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======flush====== | ||
- | |||
- | < | ||
- | |||
- | Flush current output to the browser | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | <span style=" | ||
- | </ | ||
- | |||
- | This function will send out any pending buffered data immediately | ||
- | |||
- | ====Parameters==== | ||
- | |||
- | None | ||
- | |||
- | ====Return Value==== | ||
- | |||
- | None | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code php> | ||
- | <? | ||
- | print(" | ||
- | flush(); | ||
- | print(" | ||
- | ?> | ||
- | </ | ||
- | |||
- | ====Note==== | ||
- | |||
- | This function attempts to push current output all the way to the browser with a few caveats: | ||
- | * [[flush()]] has no effect on any client-side buffering in the browser | ||
- | * Results vary by browser: different browsers have different requirements for displaying anything before the end of the script or page | ||
- | * To overcome these browser buffering issues and obtain immediate display, you may have to send a minimum amount of data, an end-of-line (EOL) character or an html tag | ||
- | * See http:// | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[print()]] - Output data to the current output stream such as a web page or terminal | ||