how to html form post - file uploading and reading json response from php server

后端 未结 5 1579
名媛妹妹
名媛妹妹 2020-12-18 06:42

i am trying file uploading to php my server.file and data uploading through multi part /form-data ,the file and data received on php server but in my php server return json

5条回答
  •  眼角桃花
    2020-12-18 06:56

    You should probably use an AJAX call. Here's a solution using jQuery:

    
    

    In order to redirect the user, you can use: window.location.href = " ... your_url ...";

    Here's an explanation on how to use jQuery AJAX and multi-part data:

    Sending multipart/formdata with jQuery.ajax

提交回复
热议问题