Re: Re: Problem: Writing into Files?
| From: | Richard Heyes | Date: | Sun, 02 Aug 2009 20:31:14 +0000 |
| Subject: | Re: Re: Problem: Writing into Files? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296185@lists.php.net to get a copy of this message | ||
> I don't quite know how I can write a bite into a file. I also looked into a
> manual and couldn't find a mention of FLock-ing in the explaination for
> FOpen parameters.
Ok, from memory:
<?php
fwrite(fopen('/tmp/counter', 'a'), '1');
?>
The 1 could be any single byte character I guess.
--
Richard Heyes
HTML5 graphing: RGraph - www.rgraph.net (updated 25th July)
Lots of PHP and Javascript code - http://www.phpguru.org