note 59491 deleted from function.flock by nlopess
| From: | nlopess@php.net | Date: | Thu, 08 Dec 2005 13:25:55 +0000 |
| Subject: | note 59491 deleted from function.flock by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-99748@lists.php.net to get a copy of this message | ||
Note Submitter: plbgnr
----
bool fclose ( resource handle )
and
resource handle isn't path to file
so previous example won't work (for php4)
and some modifications are needed:
<?php
$file = '/path/to/file.txt';
$rh=fopen ( $file, 'a+' ); // <<<
fwrite ( $rh, '.' ); // <<<
fclose ( $rh ); // <<<
$count = filesize ( $file );
?>