Forum Moderators: coopster
$hi = fopen("gbook.txt","x+");
$herro=fread($hi, filesize("gbook.txt"));
$he=fputs($hi, $ddd.$herro, strlen($ddd.$herro));
fclose($hi);
Please respond ASAP. :-)
So you see, if the file exists it will fail.
Depending on what you want I would use
$hi = fopen("gbook.txt","a+"); //to read and append the file
or first open to read
$hi = fopen("gbook.txt","r");
modify it and write to it:
$hi = fopen("gbook.txt","w");
Best regards
Michal Cibor