PHP set_file_buffer() Function

PHP stat() Function
PHP rmdir() Function

In this article, you will learn how to create buffer for file in PHP. The set_file_buffer() function in PHP specifies the number of bytes to buffer on the given file.

what is the syntax of the SET_FILE_BUFFER function in php?

set_file_buffer(file, buffer)
ParameterDescription
fileRequired. Specifies a file pointer
bufferRequired. Specifies the number of bytes to buffer
PHP SET_FILE_BUFFER() method

examples of the SET_FILE_BUFFER function

Example 1. In this example, we create an unbuffered stream.

<?php
$file = fopen("test.txt","w");
if ($file) {
  set_file_buffer($file,0);
  fwrite($file,"Hello World. Testing!");
  fclose($file);
}
?>
PHP stat() Function
PHP rmdir() Function
en English
X
Scroll to Top