RE: [PHP-WIN] Writing to a file
| From: | Fabian Cenedese | Date: | Mon, 29 Sep 2003 06:08:34 +0000 |
| Subject: | RE: [PHP-WIN] Writing to a file | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21586@lists.php.net to get a copy of this message | ||
>this doesn't work. It will still write the new line after the line (I matched). Everytime
>I read a line from a file, the $fd gets incremented, so when I say fwrite, $fd is already pointing
>to the next line in the file? Any suggestions as to working around this? I can't rewrite the
>entire file (design time controls on page, they wouldn't work if I did). As soon as I fix the
>Cascading Style Sheet line, I want to get out of the file.
Might not be fast, but it seems that if you can't go back then you have to
start over again. So in the first run read and count the lines and when you
found the one start reading again and then you know where to do it.
bye Fabi