note 11524 added to dba_open

From: Date: Fri, 23 Feb 2001 12:07:07 +0000
Subject: note 11524 added to dba_open
Groups: php.notes 
Request: Send a blank email to php-notes+get-11471@lists.php.net to get a copy of this message
DBM manual says it uses .lck to apply file locking automatically. DBA seems to have its own locking mechanics as well. ------------------------- x.php -- >8 #!/usr/local/bin/php -q <?php &nbsp; &nbsp; $db = dba_open('test.db', 'n', 'db3') || die; &nbsp; &nbsp; dba_replace('mykey', 'value1', $db) || die; &nbsp; &nbsp; sleep(5); &nbsp; &nbsp; echo dba_fetch('mykey', $db), "\n"; &nbsp; &nbsp; dba_close($db); ------------------------- x.php -- >8 ------------------------- y.php -- >8 &nbsp; &nbsp; d$db = dba_open('test.db', 'w', 'db3') || die; &nbsp; &nbsp; ddba_replace('mykey', 'value2', $db) || die; &nbsp; &nbsp; decho dba_fetch('mykey', $db), "\n"; &nbsp; &nbsp; ddba_close($db); ------------------------- y.php -- >8 shell> x.php & shell> y.php value2 shell> value1 http://www.php.net/manual/en/function.dba-open.php

« previous php.notes (#11471) next »