图片转换为base64,经过post传输后‘+’会变成 ‘空格’,
需要用PHP 处理一下
$str= $_POST['img_data']; $str= str_replace(' ','+',$str); file_put_contents('./test.png',base64_decode($str));
图片转换为base64,经过post传输后‘+’会变成 ‘空格’,
需要用PHP 处理一下
$str= $_POST['img_data']; $str= str_replace(' ','+',$str); file_put_contents('./test.png',base64_decode($str));
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。