basit bir örnek
<?php
if ($_POST['kaydet']) {
file_put_contents('dosya.txt', $_POST['dosya']);
header('Location: ' . $_SERVER['SCRIPT_NAME']);
}
?>
<form action="" method="post">
<textarea name="dosya" style="width:600px; height:300px;"><?php echo file_get_contents('dosya.txt');?></textarea>
<br />
<input type="submit" style="margin-top:5px;" name="kaydet" value="Kaydet" />
</form>