multiple image upload is not working in iphone and ipad

后端 未结 1 1416
太阳男子
太阳男子 2020-12-18 12:04

I am trying to use upload images it works perfect in browser but it doesn\'t work in iphone and ipad .below are code and screenshots for iphone

test.php
---         


        
相关标签:
1条回答
  • 2020-12-18 12:11

    Ok i have found the solution :)

    we have issue in ipad's and iphone's as they use name for all images as image.jpg so if we use multiple image this gets overridden so we need to add rand() or any unique key to the name at time of copy to folder.

    $image1 = rand().$_FILES["image1"]["name"];
        $image2 = rand().$_FILES["image2"]["name"];
        $image3 = rand().$_FILES["image3"]["name"];
    
        copy($_FILES["image1"]["tmp_name"],"upload/".$image1);
        copy($_FILES["image2"]["tmp_name"],"upload/".$image2);
        copy($_FILES["image3"]["tmp_name"],"upload/".$image3);  
    
    0 讨论(0)
提交回复
热议问题