note 101226 added to function.flock

From: Date: Fri, 03 Dec 2010 15:53:52 +0000
Subject: note 101226 added to function.flock
Groups: php.notes 
Request: Send a blank email to php-notes+get-174584@lists.php.net to get a copy of this message
I've been having trouble getting Flock to work when I read a file, delete it, and then output slightly changed information back to the same location. When deleting with Unlink, there's a very brief period of time where no file exists. But, if you do an fopen using the "w" mode, it keeps the file in existence, but deletes all of its data when you go to write to it. That way, the file never actually disappears, and another script accessing the same file with flock won't get a "file doesn't exist" error. ---- Server IP: 69.147.83.197 Probable Submitter: 68.14.139.89 ---- Manual Page -- http://www.php.net/manual/en/function.flock.php Edit -- https://master.php.net/note/edit/101226 Del: integrated -- https://master.php.net/note/delete/101226/integrated Del: useless -- https://master.php.net/note/delete/101226/useless Del: bad code -- https://master.php.net/note/delete/101226/bad+code Del: spam -- https://master.php.net/note/delete/101226/spam Del: non-english -- https://master.php.net/note/delete/101226/non-english Del: in docs -- https://master.php.net/note/delete/101226/in+docs Del: other reasons-- https://master.php.net/note/delete/101226 Reject -- https://master.php.net/note/reject/101226 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174584) next »