PHP set_file_buffer() function with example


 

PHP set_file_buffer() function with example

In this part of the tutorial we will learn about the PHP set_file_buffer() function in context of file handling. And we will also see the example related to the set_file_buffer() function

In this part of the tutorial we will learn about the PHP set_file_buffer() function in context of file handling. And we will also see the example related to the set_file_buffer() function

Syntax for PHP set_file_buffer() Function

set_file_buffer(file_handle,buffer)

  • It sets the buffer of the given file_handler with the given size

PHP set_file_buffer() Function with Example

Code for PHP set_file_buffer() Function

<?php
    $file
=fopen("bb.txt","w");
    $a
=set_file_buffer($file,200);
    if
($a)
        echo
"buffer is set";
    else
        echo
"buffer is not set";
?>

Output
buffer is set

Ads