最近在批量插入数据的时候一直插入数据出错,经过查手册以及度娘,总结出两种方法: 第一种方法: $model = new User(); foreach($data as $attributes) { $_model = clone $model; $_model->setAttributes($attributes); ...