def.txt
--内容--------
def
--------------

def.txtの内容をabcに変えたいのですが、

$fp = fopen("./def.txt" "w");
fwrite($fp,"abc");

これでは abcdef になってしまいます。
ヘルプミー