josn转数组问题

WBOY
Release: 2016-06-23 13:54:35
Original
1061 people have browsed it

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

$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");$html = iconv("gbk", "utf-8//IGNORE",$html); $s=json_decode($html,true);print_r ($s);
Copy after login


回复讨论(解决方案)

$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");$html = '{' . $html . '}'; $html = iconv("gbk", "utf-8//IGNORE",$html);$s=json_decode($html,true);print_r ($s);
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template