josn转数组有关问题

WBOY
发布: 2016-06-13 12:01:21
原创
1053 人浏览过

josn转数组问题
http://rate.tmall.com/list_detail_rate.htm?itemId=37206718528  打开这个网址就是淘宝评论的一个JOSN数据,本人用json_decode转换没效果,请问这是什么原因呢?
详细代码如下

<br />$html= file_get_contents("http://rate.tmall.com/list_detail_rate.htm?itemId=37206718528&spuId=248125721&sellerId=1975404340&order=1&currentPage=1&append=0&content=1&tagId=&posi=&picture=&ua=117tpOWUuXBidH1MRUwx%2BKHgvfSh%2BLXooZRhg%3D%3D%7CtaBkcTQxdEEUgeTB5OH0YbY%3D%7CtJFV4sagOBFJIdlQdLCUoaSARGAXj2cv166Xs2Sz%7Cs6aDR2N2MzZzRhOG48bj5vNmw8YiB4L3YmdyB5Ln8veC9%2FKHEjbh%7Csqcy9kFkoPVgpLGUUHRB1WD44BisGIw1rcXhNuE%3D%7CsYRA9%2BLH8jYz9%2BLn4pdTZvOmwwcSFzJ3s8ajJuL38teSViMWk0ST%7CsPUxhqKGQhdiB8P204ZC19KX0gXS%7Cv%2Fo%2Bia2JTRiNmFxJTHl8uI2oLVgdWI");<br />$html = iconv("gbk", "utf-8//IGNORE",$html); <br />$s=json_decode($html,true);<br />print_r ($s);<br />
登录后复制

------解决方案--------------------
$html= file_get_contents("http://rate.tmall.com/list_detail_rate.htm?itemId=37206718528&spuId=248125721&sellerId=1975404340&order=1¤tPage=1&append=0&content=1&tagId=&posi=&picture=&ua=117tpOWUuXBidH1MRUwx%2BKHgvfSh%2BLXooZRhg%3D%3D%7CtaBkcTQxdEEUgeTB5OH0YbY%3D%7CtJFV4sagOBFJIdlQdLCUoaSARGAXj2cv166Xs2Sz%7Cs6aDR2N2MzZzRhOG48bj5vNmw8YiB4L3YmdyB5Ln8veC9%2FKHEjbh%7Csqcy9kFkoPVgpLGUUHRB1WD44BisGIw1rcXhNuE%3D%7CsYRA9%2BLH8jYz9%2BLn4pdTZvOmwwcSFzJ3s8ajJuL38teSViMWk0ST%7CsPUxhqKGQhdiB8P204ZC19KX0gXS%7Cv%2Fo%2Bia2JTRiNmFxJTHl8uI2oLVgdWI");<br />$html = '{' . $html . '}'; <br />$html = iconv("gbk", "utf-8//IGNORE",$html);<br />$s=json_decode($html,true);<br />print_r ($s);
登录后复制

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板