php后台写入文本求大神教

前台提交

名字:
电话:

后台php写入
名称Y.m.d_h.i.sa.txt

使用文件流的操作,file_put_contents("Y.m.d_h.i.sa.txt",$data,FILE_APPEND);

//打开文件
$fd = fopen(“保存路径” . “文件名称”, "a");
//增加文件
$str = " 写入内容";
//写入字符串
fwrite($fd, $str . "\r\n");
//关闭文件
fclose($fd);

用户这个函数file_put_contents(),比较方便