September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool set_file_buffer(resource file_handle, int buffer)
Sets the file buffer size.
Returns:
TRUE on success; FALSE on error
Description:
With this function, you can change the file buffer size for the specified file handle. Specifying a buffer size of 0 changes the operation mode to “unbuffered”; all other values change the operation mode to “fully buffered,” using the given number of bytes.
Example:
$fh = fopen("text.txt", "r+");
$buffer_size = 4096;
if(!set_file_buffer($fh, $buffer_size))
{
echo ("Couldn't change file buffer size");
}
else
{
echo ("New file buffer size is $buffer_size bytes");
}
|
Read now
Unlock full access