时间:2020-8-23 作者:文博 分类: PHP
覆盖txt文件内容:
$filename="aa/a.txt"; $handle=fopen($filename,"w"); $str=fwrite($handle,"test"); fclose($handle);
追加内容到txt:
$filename="aa/a.txt"; $handle=fopen($filename,"a+"); $str=fwrite($handle,"test\n"); fclose($handle);