时间:2021-07-01 10:21:17 帮助过:3人阅读
public static function Download($Download){
import("Com.Buyback.QueryAmazon");
import("ORG.Net.Http");
$bookInformModel =M("admin");
$result = $bookInformModel->where("Download='$Download'")->select();
if($result[0]['image'] == ""){
$data['id'] = $result[0]['id'];
$remoteUrl = QueryAmazon::getImage($Download);
if(!empty($remoteUrl['ImageURL'])){
$localUrl = "oa/Tpl/Public/Upload/".$Download.".jpg";
Http::curl_download($remoteUrl['ImageURL'], "./".$localUrl);
}else{
$localUrl = "oa/Tpl/Public/Upload/";
}
$data['image'] = $localUrl;
$bookInformModel->save($data);
return $localUrl;
}
return $result[0]['image'];
}
点击下载的时候
下载
不能下载 求解释