Re: [PHP] $_GET is Mangling Base64 value
[email protected] (Michael Shadle)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Mar 11, 2010 at 1:57 PM, George Langley <[email protected]> wrote: > xxxxx is a Japanese phrase, that has been encoded into Base64. So is using the + symbol: > > ...OODq+OCou... > > but my $_GET is replacing the + with a space: > > ...OODq OCou... > > thus the base64_decode() is failing (displays diamonds with questions marks on my Mac). You could always pre-parse it with $_GET['foo'] = str_replace(' ', '+', $_GET['foo']); and inject them back in... I have had to do something like that in the past because of the same issue (I either needed to add or remove the + I forget)