Re: File Edit

From: Date: Tue, 26 Mar 2002 02:10:32 +0000
Subject: Re: File Edit
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90137@lists.php.net to get a copy of this message
How do I know what part of it to read in the array? ----- Original Message ----- From: "Rasmus Lerdorf" <rasmus@lerdorf.ca> To: "Randy Johnson" <php@icecoldgold.com> Cc: <php-general@lists.php.net> Sent: Monday, March 25, 2002 9:03 PM Subject: Re: [PHP] File Edit > You read the entire file into memory (an array using file() perhaps) and > then edit it in memory and write the entire new file back out. > > -Rasmus > > On Mon, 25 Mar 2002, Randy Johnson wrote: > > > Hello, > > > > > > I want to be able to edit part of a file. via a text box using php how do i read a file and get the part i want to read and edit it and then write it back to that file here is an example: > > > > ..... > > case "$1" in > > start) > > > > 100.123.456.789 > > 321.654.987.231 > > 123.45.456.789 > > 123.456.789.12 > > > > ;; > > > > ........ > > > > In this example I want to be able to be able to pull the ipaddresses out and edit them and add a new one on to the end and then write the data back to the file. > > > > > > Thanks in advance > > > > > > Randy > > > > > > >

« previous php.general (#90137) next »