摘要: 1 <?php 2 //写文件 3 $f = fopen('1.txt', 'a+'); 4 flock($f, LOCK_EX); 5 fwrite($f, 'hello'); 6 flock($f, LOCK_UN); 7 fclose($f); 8 9 //读文件 10 $f = fopen('1.txt', 'r+'); 11 flock($f, LOCK_SH); ... 阅读全文
posted @ 2016-07-11 23:01 pigfly 阅读(1031) 评论(0) 推荐(0) 编辑