摘要: 使用redis队列,因为pop操作是原子的,即使有很多用户同时到达,也是依次执行,推荐使用(mysql事务在高并发下性能下降很厉害,文件锁的方式也是) 先将商品库存如队列 [php] view plain copy <?php $store=1000; $redis=new Redis(); $re 阅读全文