fflush

It flushes the output to a file

Example

<?php

$filename = ‘test.txt’;

$file = fopen($filename, ‘r+’);

fwrite($file, ‘phpcodez’);

fflush($file);

?>