我目前正在从RETS获取数据,我可以从RETS中提取信息但无法获取图像。我试着用下面的代码:PHRETS 2.0无法获取图像
$photos = $rets->GetObject("Property", "Photo", $record['L_ListingID'], "*", 1);
if ($photos !== null) {
foreach ($photos as $photo){
var_dump ($photo);
}
}
,并收到下面的结果:
object(PHRETS\Models\Object)#71 (10) {
["content_type":protected]=>
string(8) "text/xml"
["content_id":protected]=>
string(9) "261860123"
["object_id":protected]=>
string(1) "1"
["mime_version":protected]=>
NULL
["location":protected]=>
NULL
["content_description":protected]=>
NULL
["content_sub_description":protected]=>
NULL
["content":protected]=>
string(71) "
"
["preferred":protected]=>
NULL
["error":protected]=>
object(PHRETS\Models\RETSError)#73 (2) {
["code":protected]=>
int(0)
["message":protected]=>
string(0) ""
}
}
为代码的建议,我只能得到“文/ XML”恢复为对象的CONTENT_TYPE,我应该期待一个jpg文件。我怎样才能得到图像,并没有得到文字?