Upload Image iOS to PHP -


i trying upload image ios application php backend. have followed samples online; however, receiving php error code of 3 (upload_err_partial). can me out? i'm using [nsurlconnection sendasynchronousrequest:queue:completionhandler].

i have read people disable connection header, isn't working either. there server side should check?

<? $uploaddir = '';      //uploading same directory php file $file = basename($_files['userfile']['name']); $uploadfile = $uploaddir . $file;  if ($_files['userfile']['error'] === upload_err_ok) {  } else {     die("upload failed error code " . $_files['userfile']['error']); } ?> 

you can upload/send data on php using post/get method of ios.

for post method

http post method php , ios

for method

http://codewithchris.com/tutorial-how-to-use-ios-nsurlconnection-by-example/

for both

how send post , request?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -