flock

From: Date: Thu, 19 Oct 2000 00:03:39 +0000
Subject: flock
Groups: php.general 
Request: Send a blank email to php-general+get-21018@lists.php.net to get a copy of this message
I try to do function writeNewQuestion($filename, $newquestion) { $fp = fopen($filename, "a"); while(!flock($fp, 2)) { print("try to flock<BR>\n"); } print("flock done<BR>\n"); fwrite($fp, "1/" . $newquestion); fclose($fd); } writeNewQuestion("questions.dat", "Test"); But I never get a flock. I don't understand why. All I want is to prevent people to access the file while i write something to its end. Minh _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.

« previous php.general (#21018) next »