Want to improve this question? Add details and clarify the problem by editing this post.
Closed 10 years ago.
问题是您正在返回 JSON 格式,但尝试对其进行反序列化,这应该可以工作:
$imgid = $video_cek["embed"]; $hash = json_decode(file_get_contents("http://www.dailymotion.com/services/oembed?format=json&url=http://www.dailymotion.com/embed/video/$imgid"), true); $video_cek['baslik']= $hash['title'];
The problem is you are returning JSON Format but trying to unserialize that, this should work:
你得到一个 json 响应,所以使用 json_decode 函数来接受 JSON 编码字符串并将其转换为 PHP 变量。
喜欢:
$array = json_decode($hash, true); echo $array['title'];
或
$array = json_decode($hash); echo $array->title;
you get a json response, so use json_decode function to Takes a JSON encoded string and converts it into a PHP variable.
like:
or
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
问题是您正在返回 JSON 格式,但尝试对其进行反序列化,这应该可以工作:
The problem is you are returning JSON Format but trying to unserialize that, this should work:
你得到一个 json 响应,所以使用 json_decode 函数来接受 JSON 编码字符串并将其转换为 PHP 变量。
喜欢:
或
you get a json response, so use json_decode function to Takes a JSON encoded string and converts it into a PHP variable.
like:
or