close
主要是用在PHP寫入LOG檔
使用file_put_contents()並帶入正確參數,如下:
file_put_contents('logs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);
--
Try something like this:
$txt = "user id date";
$myfile = file_put_contents('logs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);
--
轉自 https://stackoverflow.com/questions/24972424/create-or-write-append-in-text-file
全站熱搜