[英]How to retrive image from parse.com using php
I am trying to fetch the image which is already in parse database. 我正在尝试获取已在解析数据库中的图像。 In array I am getting the all the fetched data including the image URL but when I am trying to echo that particular URL it is echoing blank!!
在数组中,我获取所有获取的数据,包括图像URL,但当我试图回显该特定的URL时,它回显空白! Bellow is the code
贝娄是代码
$object = new ParseQuery("billComputing");
$getdata=$object->descending("updatedAt");
$results = $object->find();
$data=$results[0];
echo "<pre>";
print_r($results);
echo "signature".$sign=$data->get('Signature["url"]');
In print_r() - I am getting this 在print_r()中 - 我得到了这个
[Signature] => Parse\ParseFile Object
(
[name:Parse\ParseFile:private] => tfss-8a4dbd13-7e16-4efc-abcf-08e901924f49-sign
[url:Parse\ParseFile:private] => http://files.parsetfss.com/864d47af-9eac-4b75-ae30-17b7352d16ca/tfss-8a4dbd13-7e16-4efc-abcf-08e901924f49-sign
[data:Parse\ParseFile:private] =>
[mimeType:Parse\ParseFile:private] =>
)
I am not able to display the URL. 我无法显示网址。 Appreciate help in advance.
提前感谢您的帮助。
Try this : 尝试这个 :
$object = new ParseQuery("billComputing");
$getdata=$object->descending("updatedAt");
$results = $object->find();
$data=$results[0];
echo "<pre>";
print_r($results);
$file = $data->get('imageColumnName');
$imageURL = $file->getURL();
// you will get image url in $imageURL variable.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.