1) Turn on zlib.output_compression in your php.ini, default is Off, edit it to On.
2) If you using notepad++ for coding, save the file cause problem without BOM.
3) If after finishing (1) and (2) still is not work, check your php syntax. For me case it's strange that i use return syntax to replace echo , the problems solved.
from
public function uploadImage(){to
//To do sth
$response['resultCode'] = "s";
echo json_encode($response);
}
public function uploadImage(){
//To do sth
$response['resultCode'] = "s";
return json_encode($response);
}
No comments :
Post a Comment