3
我想讓這個工作,但看不到我要去哪裏錯了。任何人都可以協助PHP json_decode帶回null
<?php
$jsonurl = 'http://www.foxsports.com.au/internal-syndication/json/livescoreboard';
$json = file_get_contents($jsonurl,0,null,null);
$json_output = var_dump(json_decode($json,true));
echo $json_output
?>
對不起,它不適合我我得到「NULL - 語法錯誤,格式錯誤的JSON」。它與引號中的json有什麼關係? – Gopher 2012-03-24 21:21:20
@Gopher它正在工作。與此同時,JSON突然包含...導致它崩潰的註釋。給我一分鐘,我會看看我們能做些什麼...... – 2012-03-24 21:40:17
@Gopher我們現在剝奪了評論('strip_tags'),它正在工作(再次);我已經檢查過我自己現在... :-) – 2012-03-24 21:43:24