Query: stream_set_write_buffer
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
STREAM_SET_WRITE_BUFFER(3) 1 STREAM_SET_WRITE_BUFFER(3) stream_set_write_buffer - Sets write file buffering on the given streamSYNOPSISint stream_set_write_buffer (resource $stream, int $buffer)DESCRIPTIONSets the buffering for write operations on the given $stream to $buffer bytes. Output using fwrite(3) is normally buffered at 8K. This means that if there are two processes wanting to write to the same output stream (a file), each is paused after 8K of data to allow the other to write.PARAMETERSo $stream - The file pointer. o $buffer - The number of bytes to buffer. If $buffer is 0 then write operations are unbuffered. This ensures that all writes with fwrite(3) are completed before other processes are allowed to write to that output stream.RETURN VALUESReturns 0 on success, or EOF if the request cannot be honored.EXAMPLESExample #1 stream_set_write_buffer(3) example The following example demonstrates how to use stream_set_write_buffer(3) to create an unbuffered stream. <?php $fp = fopen($file, "w"); if ($fp) { stream_set_write_buffer($fp, 0); fwrite($fp, $output); fclose($fp); } ?>SEE ALSOfopen(3), fwrite(3). PHP Documentation Group STREAM_SET_WRITE_BUFFER(3)
Related Man Pages |
---|
fread(3s) - bsd |
setvbuf_unl(3s) - hpux |
setvbuf_unlocked(3s) - hpux |
fwrite(3) - php |
stream_filter_remove(3) - php |
Similar Topics in the Unix Linux Community |
---|
fopen and open |
Help -fwrite consuming lot of memory !!! |
fwrite in Linux and UNIX |
The fwrite function is not returning error, if the file was removed. |