';
}
// remember to close the filestream
fclose($filestream);
$append_str = "let's append text \n\r";
// open with append mode
$filestream = fopen($fname, 'a') or die('Unable to open file!');
$num = fwrite($filestream, $append_str);
if ($num)
{
// echo "$num bytes written to $fname";
// display content after appending
echo file_get_contents($fname) .'
';
}
// remember to close the filestream
fclose($filestream);
?>