图片转换为base64,经过post传输后‘+’会变成 ‘空格’,
需要用PHP 处理一下
$str= $_POST[‘img_data‘]; $str= str_replace(‘ ‘,‘+‘,$str); file_put_contents(‘./test.png‘,base64_decode($str));
【PHP】图片转换为base64,经过post传输后‘+’会变成 ‘空格’
原文:https://www.cnblogs.com/richerdyoung/p/11377396.html