mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
58e742d435
commit
9b7733b978
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue