用PHP建立txt文件,并写入文字内容 2022年6月11日17:27:47日常收集115阅读模式 <?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); ?> 效果,在同文件夹自动建立了一个newfile.txt文件夹,里面的内容是 Bill Gates Steve Jobs 点赞 登录收藏 https://www.jun.la/collect/1157.html 复制链接 复制链接