yii save后获取保存数据的id $chapterComment->save(); $id = $chapterComment->attributes['id']; var_dump($id); alex kong