Moving the pointer in a file...
| From: | Kondwani Spike Mkandawire | Date: | Fri, 12 Jul 2002 15:22:53 +0000 |
| Subject: | Moving the pointer in a file... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107381@lists.php.net to get a copy of this message | ||
I am trying to read and write to a file on Line 5 and line 5 alone...
$file = fopen($fileName, "r+");
Places the pointer at the beginning of the file I have tried the
following...
$line = fgets($file, 255);
$line = fgets($file, 255);
$line = fgets($file, 255);
$line = fgets($file, 255);
fputs($file, "the Line I want to write;");
but nothing is happening... Please Help...
Kondwani