RE: [PHP] Re: Editing files by line

From: Date: Tue, 16 Jul 2002 00:46:14 +0000
Subject: RE: [PHP] Re: Editing files by line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-107771@lists.php.net to get a copy of this message
-----Original Message----- From: Analysis & Solutions Sent: Friday, July 12, 2002 9:57 AM To: PHP List Subject: Re: [PHP] Re: Editing files by line >Unfortunately, if a file is opened for appending via fopen('name', 'a'), >the manual says the data is put at the end of the file regardless of using >fseek(). > > --Dan I've written a script that edits a specific line in a text file and saves the changes to the file for that specific line. I've noticed though that I can't edit the first line in the file, which would be zero in the array created by the file() function. When I write the edited data back to the file I am using "w+" as the mode. Is this related to the array or to the file mode? -- Onaje Johnston

« previous php.general (#107771) next »