php如何解决多线程同时读写一个文件的问题
<?phpheader("content-type:text/html;charset=utf-8");$fp = fopen("lock.txt","w+");if(flock($fp, LOCK_EX)){// 进行排它型锁定 fwrite($fp,"Write something here\n"); flock($fp, LOCK_UN);// ...