Fix example (bug #50177)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@290804 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2009-11-16 11:19:59 +00:00
parent 58e742d435
commit 9b7733b978

View file

@ -132,10 +132,10 @@
<![CDATA[
<?php
$fp = fopen("/tmp/lock.txt", "w");
$fp = fopen("/tmp/lock.txt", "r+");
if (flock($fp, LOCK_EX)) { // do an exclusive lock
ftruncate($fp, 0); // truncate file
ftruncate($fp, 0); // truncate file
fwrite($fp, "Write something here\n");
flock($fp, LOCK_UN); // release the lock
} else {