I've been trying to figure out how to prevent multiple users from writing to the same file at once -- if that causes a conflict. Anybody know how to write a script that would enable multiple users writing to this file to write to it all at once? I've been doing some reading... Does flock() have something to do with it? If more than one person tries to write to this file will they que up or will they die?
else if (!empty($newlink)){
if ($error == "OOPS!<br>"){
$fp=fopen($filename, 'a+');
fwrite ($fp, $cleanlink);
print "<b> Your link:</b> ".str_replace("|","", $cleanlink);
}
Preventing multiple users from writing to the same file.
Moderator: General Moderators
I guess it must be imossible
I guess it must be impossible... Or maybe too much.... Whatever.