how to upload image in php using iOS -


i new in web services in php don't behavior of ios upload image write down php code can me wrong in php code or there wrong in ios code

$picname = $_files['name']['pic_data'];  move_uploaded_file($_files["file"]["tmp_name"], 'images/'.$picname); 

i think must sending this:

xhrregister.send({ file : selectedphoto }); 

and can in php this:

if ($_files["file"]["error"] > 0) {   // error } else {   $filename = uniqid() . $_files["file"]["name"];   $filetype = $_files["file"]["type"];   move_uploaded_file($_files["file"]["tmp_name"], 'images/' . $filename); } 

Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -