标签:
<?php function writeFile() { $fp = fopen(‘test.txt‘, ‘w+‘); if (flock($fp, LOCK_EX)) { fwrite($fp, ‘Write Someting‘); //release file lock flock($fp, LOCK_UN); } else { echo "Error locking file!"; } fclose($fp); }
标签:
原文地址:http://www.cnblogs.com/dragonli/p/5527421.html