PHP简单写入文件demo
<?php
$filepath = 'log/';
if (!file_exists($filepath)){
mkdir ($filepath,0777,true);
}
//a:追加 w:覆盖
$myfile = fopen("log/log.docx", "a") or die("Unable to open file!");
fwrite($myfile, "112");
fclose($myfile);
?>
PS:仅记录