Home  >  Article  >  Backend Development  >  怎么把js用的json数据,用php来还原

怎么把js用的json数据,用php来还原

WBOY
WBOYOriginal
2016-06-13 11:27:04819browse

如何把js用的json数据,用php来还原。
$str=file_get_contents("http://news.soso.com/frontpage.q?ty=1&city=%E6%B2%B3%E6%BA%90");
$str=stripslashes($str);
echo json_decode($str);   //这里老是不能输出数据。









Statement:
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