dtpk04526211 2011-11-22 13:11
浏览 41
已采纳

从rss提取封装到图像中

I need to extract the image url from this enclosure. How can i access it?

["enclosure"]=> object(SimpleXMLElement) {
    ["@attributes"]=> array(3) {
        ["url"]=> string(81) "http://image.jpg"
        ["length"]=> string(4) "5000"
        ["type"]=> string(10) "image/jpeg"
    }
}  
  • 写回答

1条回答 默认 最新

  • dongwen4630 2011-11-22 13:12
    关注
    $url = (string) $var['enclosure']->attributes()->url;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?