note 43179 deleted from function.fwrite by nlopess
| From: | nlopess@php.net | Date: | Sat, 12 Jun 2004 08:55:50 +0000 |
| Subject: | note 43179 deleted from function.fwrite by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-70960@lists.php.net to get a copy of this message | ||
Note Submitter: suthert at yahoo dot com
----
i've tried to append to the front of a file :( no luck... so i did this:
if (file_exists($blogfile)) {
$handle = fopen($blogfile, "rb");
$contents = fread($handle, filesize($blogfile));
fclose($handle);
}
if (file_exists($blogfile)) {
$handle = fopen($blogfile, "wb");
fwrite($handle, $writeblog);
fwrite($handle, $contents);
fclose($handle);
}
i may have rudimentary errors there - but it worls :)
now i just need to read line by line :P