To upload the image file to a web form

后端 未结 3 471
一个人的身影
一个人的身影 2020-12-18 13:50

I do have some image files(.png files) in document directory(iPhone). I am viewing web forms(.aspx) on the UIWebView. when I click on the submit button of the form, i just w

3条回答
  •  暖寄归人
    2020-12-18 14:22

    Solved my own problem! Last echo line is what needed to be adjusted!

     3000000000000000) {
    exit("Your file is too large."); 
    }
    
    if (move_uploaded_file($_FILES['userfile']['tmp_name'], $newName)) {
    $postsize = ini_get('post_max_size');   //Not necessary, I was using these
    $canupload = ini_get('file_uploads');    //server variables to see what was 
    $tempdir = ini_get('upload_tmp_dir');   //going wrong.
    $maxsize = ini_get('upload_max_filesize');
    echo "http://localhost:8888/wouldYa/images/{$randomNumber}{$file}" . "\r\n";
    }
    ?>
    

    Now I am in the mist of saving the Str in Xcode, to another PHP file to insert the filename to that user's section in my table, specifically the display picture section, this should be no hard and implemented :-)

    If you are interested in my full source code, please let me know, I know it is not that secure yet but soon it will.

提交回复
热议问题