My php script needs to write text file, (actualy write php code), in order to include it on the next run. So I have all my data (arrays) from the previus run, with out the use of database. The files are saved on a network drive (SAN).
The script runs 3-4 times in a sec (approx every 300 milisecs) and the size of file is 1.2 MB (approx)
Some times the file are corrupted, with missing END OF FILE (EOF)
Some times I get junks of text (repetead part of string)
eg.
$write_string = '$arrMK[1][1]=1.80;$arrMK[1][2]=1.82;$arrMK[1][3]=2.14;$arrMK[1][4]=1.80;$arrMK[2][1]=2.43;$arrMK[2][2]=1.13;$arrMK[2][3]=1.33;$arrMK[2][4]=4.11;... and so on...';
and the content of file is like (bold is repeted part):
$arrMK[1][<strong>1]=1.80;$arrMK[1][2]</strong>=1.82;$arrMK[1][3]=2.14;$arrMK[1][4]=1.80;$arrMK[2][1]=2.43;$arrMK[2][2]=1.13;$ar<strong>1]=1.80;$arrMK[1][2]</strong>rMK[2][3]=1.33;$arrMK[2][4]=4.11;
If the file size is less than 1 MB, everything is OK.
I have try using fopen/fwrite, file_put_contents, with the same results. Any suggestion about that?
Elias