fsync
fsync
Synchronizes changes to the file (including meta-data)
bool **fsync** resource $stream
This function synchronizes changes to the file, including its meta-data. This is similar to ,
but it also instructs the operating system to write to the storage media.
fflush
stream
return.success
Voorbeeld: example
<?php
$file = 'test.txt';
$stream = fopen($file, 'w');
fwrite($stream, 'test data');
fwrite($stream, "\r\n");
fwrite($stream, 'additional data');
fsync($stream);
fclose($stream);
?>
fdatasync``fflush