I have a script which is backing up my mysql database. The text file is always being incremented and at the end there is a fclose($fptr);
However the file is over 3MB so it takes a while to write. No problem under most circumstances but ... I want to email the file so I have to pause for a wee bit to allow the file to be written before trying to email it.
Currently all I get sent is the shell created when the file pointer is first created.
My current solution is
for ($i = 0; $i < 1000; i++)
{$j = true;}
Any ideas?