|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2008-06-12 10:31 UTC] vesselin dot atanasov at gmail dot com
  [2008-06-12 11:09 UTC] vesselin dot atanasov at gmail dot com
  [2008-06-12 13:33 UTC] mgf@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
Description: ------------ flush function output for html body in some times.it disappear at begin and end of html body. exsample code: <?php define('XML_RPC', TRUE); $XMLRPCVersion="1.0"; flush(); exit; ....more code ?> it display: 0 <?php define('XML_RPC', TRUE); $XMLRPCVersion="1.0"; ob_flush(); exit; ....more code ?> it display nothing compare with to http headers i found that: "Content-Length: 0" exist when use ob_flush but not exist in flush so i add this in my php codes like this <?php define('XML_RPC', TRUE); $XMLRPCVersion="1.0"; header("Content-Length: 0"); flush(); exit; ....more code ?> now all thing is work will! i download php source code an compare flush with ob_flush. in ob_flush: if (send_buffer) { if (just_flush) { /* if flush is called prior to proper end, ensure presence of NUL */ final_buffer[final_buffer_length] = '\0'; } OG(php_body_write)(final_buffer, final_buffer_length TSRMLS_CC); } in flush: if (sapi_module.flush) { sapi_module.flush(SG(server_context)); return SUCCESS; } else { return FAILURE; } i can't understand well with this codes but i think maybe some buffer is not zeromemory befor used.