发布时从base64编码的字符串中删除空格 [英] remove whitespaces from base64 encoded string when posting

查看:568
本文介绍了发布时从base64编码的字符串中删除空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从base64编码文件中删除空格.当Base64发布时,我在输出字符串中放了更多空格.这些空格哪里来了

I need to remove white spaces from a base64 encoded file . When Base64 gets POSTed, and I got more white spaces in out put string.Where did these white spaces are coming

我如何清除这些白斑

推荐答案

发布Base64时,所有pluses(+)都被解析为空格.因此,我使用str_replace将空格转换回正号. 这节省了我的时间

When Base64 gets POSTed, all pluses(+) are parsed as spaces. So I used str_replace to convert the spaces back to pluses. This saved my time

这篇关于发布时从base64编码的字符串中删除空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆