php3.2 并发加锁,thinkphp3.2文件锁解决并发的一种办法
namespace app\index\controller;use think\Controller;use think\Cache;class Index extends Controller{/*** 首页* */public function index(){$fp = fopen("lock.txt", "w+");if(flock($fp,LOCK_EX)) //锁定当前指针,,,...