18.18.1 Problem
18.18.2 Solution
fwrite($fh,'There are twelve pumpkins in my house.'); fflush($fh);
This ensures that "There are twelve
pumpkins in my house." is written to $fh.
18.18.3 Discussion
To be more efficient, system I/O libraries generally don't
write something to a file when you tell them to. Instead, they batch the writes
together in a buffer and save all of them to disk at the same time. Using
fflush( ) forces anything pending in the write buffer to be actually
written to disk.