Re: Some advice on working with files

From: Date: Tue, 27 Jun 2000 21:21:32 +0000
Subject: Re: Some advice on working with files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3452@lists.php.net to get a copy of this message
I dealt with the problem myself just recently (yesterday, in fact). The best solution I found was to write C scripts and execute them from PHP (because C offers much more robust filehandling stuff) but, barring that, I'd read it all into an array and manipulate the individual lines... otherwise modifying text files is a real pain. ----- Original Message ----- From: Ken N <kenn@pcintelligent.com> To: <php-general@lists.php.net> Sent: Tuesday, June 27, 2000 1:14 PM Subject: [PHP] Some advice on working with files > Hi. > > I need to open a file and be able to delete and modify contents of it. I > have looked at the file functions but it seems like I am a little limited. > For instance, what if I wanted to open a file pick out 3 or 4 line os text > and replace them? How best to do this. Sure I could use egrep_replace() > but in php I can't egrep an entire file. Unless There's someting I don't > know about. > > If anyone has dealt with this kind of situation and has some advice I > would love to hear it. > > Thanks > Ken N > > http://cleveland.lug.net/~rocket/ > > The answer is simple if you grant that ironies are like submarines; > dangerous only when submerged. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#3452) next »