|
Hello, I've got a problem. I need add some information at the beginning of file. So, I wrote:
$fp=fopen("file.dat", "a");
flock($fp, LOCK_SH);
rewind($fp);
fwrite($fp, "string");
flock($fp, LOCK_UN);
fclose($fp);
But when I open "file.dat", the "string" is in the end... I don't understand it, please help. Thanks
|