PHP “Cannot use object of type stdClass as array”
原参考网址 https://blog.youkuaiyun.com/pengxuan/article/details/50520781原因是使用 json_decode 后数组中的对象进行取值解决方法(2种):1、使用 json_decode($d, true)。就是使json_decode 的第二个变量设置为 true。2、json_decode($res) 返回的是一个对象, 不可以使用 $re...
转载
2019-03-15 14:47:39 ·
388 阅读 ·
0 评论