$satir1 = 'En üst satir'; $satir2 = 'En alt satir'; $txt = file_get_contents('dosyaadi.txt'); $son = "$satir1\n$txt\n$satir2"; $dosya = fopen($txt, w); fwrite($dosya, $son); fclose($dosya);