note 26538 rejected from function.flock by tix

From: Date: Mon, 04 Nov 2002 07:10:09 +0000
Subject: note 26538 rejected from function.flock by tix
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38942@lists.php.net to get a copy of this message
about: wouldblock --- <?php $file= fopen("test.txt","a"); if ( flock ( $file, LOCK_EX, FALSE ) ) fwrite ( $file, "ok..."."\n" ); else echo "It's busy!"; flock( $file, LOCK_UN ); fclose ( $file ); ?> --- If "wouldblock" flag isn't set to TRUE and $file is locked by another program, this program return me "It's busy!" or wait for unlock? Thanx...

« previous php.notes (#38942) next »