Current Location: Home> Function Categories> set_file_buffer

set_file_buffer

alias for stream_set_write_buffer
Name:set_file_buffer
Category:File system
Programming Language:php
One-line Description:Sets the buffer size of the opened file.

Definition and usage

set_file_buffer() function sets the buffer size of the open file.

If successful, the function returns 0. If it fails, return EOF.

Example

Create unbuffered streams:

 <?php
$file = fopen ( "test.txt" , "w" ) ;
if ( $file )
  {
  set_file_buffer ( $file , 0 ) ;
  fwrite ( $file , "Hello World. Testing!" ) ;
  fclose ( $file ) ;
  }
?>

grammar

 set_file_buffer ( file , buffer )
parameter describe
file Required. Specifies the file to be opened.
Buffer Required. Specify the buffer size, measured in bytes.
Similar Functions
  • Set file access and modification time touch

    touch

    Setfileaccessandmodi
  • Rename a file or directory rename

    rename

    Renameafileordirecto
  • Return the target of the symbolic link readlink

    readlink

    Returnthetargetofthe
  • Determine whether the given file name is a symbolic connection is_link

    is_link

    Determinewhethertheg
  • Establish symbolic connection symlink

    symlink

    Establishsymboliccon
  • Truncate the file to a given length ftruncate

    ftruncate

    Truncatethefiletoagi
  • alias for stream_set_write_buffer set_file_buffer

    set_file_buffer

    aliasforstream_set_w
  • Provide information about the document stat

    stat

    Provideinformationab
Popular Articles