f ($handle)) {
$buffer = fgets($handle, 8192);
if (substr($buffer,0,1)!=='[' && substr($buffer,0,3)!=='TYP'){
$hf = fopen($target, 'a');
fwrite($hf, $buffer);
fclose($hf);
}
}
fclose ($handle);
That should do the trick.
George
> -Original Message---
On Mon, July 11, 2005 4:13 pm, babu said:
> $f=fopen($file,"w");
http://php.net/fopen
"w" will open the file for WRITING, a fresh, new, EMPTY file.
You want "r+" or "a+" or "w+" or something similar.
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.p
Hi i have a txt file like
[SUBSTRAT]
TYP=25x25_10
SUBSTRATNAME=S112
PIXEL=5
OPERATOR=Zi
KOMMENTAR=dunkel
INTENSITAET=1000.00
[MESSUNG]
DATUM=03.01.2005
UHRZEIT=11:22
MESSUNG=SWEEP_UI
i want to delete lines which start with '[' and 'TYP'. i have multiple such
files.i have used strstr method.
3 matches
Mail list logo