格式化时间戳字帖
xiaozi 2014-12-10 23:35:09
fopen以append模式打开文件时,fwrite本身就是原子操作(除非string大于系统的block size,一般为4k),不需要使用flock
<?php $fd = fopen('test.txt', 'a+'); // flock($fd); fwrite($fd, '测试内容'); fclose($fd);
홈 - 위키 Copyright © 2011-2026 iteam. Current version is 2.152.0. UTC+08:00, 2026-02-08 22:54 浙ICP备14020137号-1 $방문자$