$pingluninfo = <<
{
"title":"123",
"url " の読み取りにどのような間違いがあるでしょうか? :"http://localhost/?p=9",
"ttime":1401327899094,
"sourceid":"9",
"parentid":"0",
" categoryid ":"",
"ownerid":"",
"metadata":"",
"comments":[
"cmtid":"358",
"ctime" :1401327899094,
"content":"2013 年 8 月 1 日 18:36:29 O(∩_∩)O~",
"replyid":"0",
"user":{
"userid":"1",
"nickname":"admin",
"usericon":"",
"userurl":"",
"usermetadata":{
「エリア」:「北京都市」、
"ジェンダー": "1"、
"kk": ""、
"level":1
}
firefox /22.0",
"channeltype":"1",
"from":"",
"spcount":"",
"opcount":"",
"attachment ":[
"type":1,
"desc":"",
"url":"http://img.sohu.itc/xxxx"
> }
]
}
EOT;
$pingluninfo = json_decode($pingluninfo, true);
if(!$pingluninfo) {
die('間違ったデータ形式' );
}
?>
常に間違ったデータ形式を出力する
-----解決策のアイデア------------- --- -------
$pingluninfo = <<
{
"title": "123" 、 "url":"http://localhost/?p=9"、<br> "ttime":1401327899094、<br> "sourceid":"9"、<br> "parentid" :"0 ",<br> "categoryid":"",<br> "ownerid":"",<br> "metadata":"",<br> "comments":[<br> {<br> "cmtid" :"358"、<br> "ctime":1401327899094,<br> "content":"2013年8月1日18:36:29 O(∩_∩)O~",<br> "replyid":"0",<br> "user":{<br> "userid":"1",<br> "nickname":"admin",<br> "usericon":"",<br> "userurl":"",<br> "usermetadata":{<br> "area": "北京市",<br> "gender": "1",<div class="clear"></div>