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
for method
http://codewithchris.com/tutorial-how-to-use-ios-nsurlconnection-by-example/
for both
Comments
Post a Comment