Re: Deleting 1 file line

From: Date: Wed, 16 May 2001 18:43:53 +0000
Subject: Re: Deleting 1 file line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52998@lists.php.net to get a copy of this message
Good question. Never had to face such problems before... but what I can do actually is: 1) Read file into variable till i reach that line 2) Skip that line 3) Continue reading till eof 4) writting back the buffer to the file. Basically use file() then preg_replace() then fopen() fwrite() fclose() -Elias http://www.eassoft.cjb.net "Tarrant Costelloe" <tcostelloe@insur-e.net> wrote in message news:B8DC55700B11DA4F8AA61B2803F3D1A805C4AB@insure-ems.insur-e.net... > Does anyone know what the code is, if you wanted to specify a specific line > in a file to delete and also to wipe clean the entire file? > > Thanks in advance! > > Taz > > -- > 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 (#52998) next »