如何通过表单将图像从一个网站上传到PHP中的另一个网站文件夹

时间:2019-01-07 11:45:40

标签: php image upload

我正在有条件地上传图片:

if($row["website"] == 'mywebsite') { 
    move_uploaded_file($_FILES["applicant_passport_size_photo"]["tmp_name"],"https://www.mywebsite.com/upload/user_photo/".$f_name);
}else {
    move_uploaded_file($_FILES["applicant_passport_size_photo"]["tmp_name"],"../upload/user_photo/".$f_name);
}

0 个答案:

没有答案