I'm trying to edit a php file and use fwrite to add a line to the top of the page. But in my attemps it's been adding it to the bottem.
Trying to add 'new stuff' to the top of the page of theshow.txt
Thanks
<?
$myFile = "theshow.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "New Stuff 1\n";
fwrite($fh, $stringData);
$stringData = "New Stuff 2\n";
fwrite($fh, $stringData);
fclose($fh);
?>