When using file_put_contents in for loop, I tried this
for(loop) {
file_put_contents("content ");
}
So if power failure occurs in middle of loop.
Some data should be written in the file.
But it is blank
I have the same problem with fputcsv()
I am closing and opening the file on every iteration of for loop when using fputcsv()
I tried this
for(loop) {
open file;
fputcsv();
close;
}