分页报错 Indirect modification of overloaded

浏览:8381 发布日期:2016/09/09 分类:ThinkPHP5专区
$data = db('user')->paginate(6);
$data[0]['uid'] = '1';
这行 $data[0]['uid'] = '1';
会报错
Indirect modification of overloaded element of think\paginator\Collection has no effect

我以为是返回的是对象类型,改成模块select 返回也是对象类型,$data[0]['uid'] 这样写法就没报错

最佳答案
评论( 相关
后面还有条评论,点击查看>>