I don't know the code, but I would assume you could do the following:
1) read the file into an array, with each line as an element
2) search the element that has the line you're looking for...probably a
keyword
3) remove that element from the array
4) implode the array
5) rewrite th
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()
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
3 matches
Mail list logo