2020-03-07 / 6080阅
创建并打开一个文本文件,在文本中追加内容或者读取文本中的内容
经常用作日志记录。
<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = "Bill Gates\n";
fwrite($myfile, $txt);
$txt = "Steve Jobs\n";
fwrite($myfile, $txt);
fclose($myfile);
?> 阅读文章或者观看视频过程中有任何问题,请下方留言或者联系我Q248758228