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
try json_decode.
$data = ({"code":0, "message":"success"}); $array = json_decode($data, true);
by passing 2nd parameter to true you will get response in array instead of object.
the array will be then populated as follow:
array (size=2) 'code' => int 0 'message' => string 'success' (length=7)