Zapis za koniec suboru

mam subor /content/status.txt s tymto obsahom:

Home
Test_page_one
Test_page_two

Chcem na koniec tohoto suboru napisat 'Test_page_three' aby som mal subor s tymto obsahom:

Home
Test_page_one
Test_page_two
Test_page_three

Ako? Skusam som milion metod otvarania suborov a prace s nimi ale nic. Plz help!

--Athosino
$f = fopen('status.txt', 'a');
fwrite($f, "Test_page_three\n");
fclose($f);

tusim daco taketo

$fd = fopen($filename, "a+");
fwrite($fd,"\nTest_page_three);
fclose($fd);


neskusal som , ale malo by to fungovat
len som tam zabudol jeden "