RE: [PHP] Displaying image paths with spaces
| From: | Bob McConnell | Date: | Tue, 08 Sep 2009 13:48:20 +0000 |
| Subject: | RE: [PHP] Displaying image paths with spaces | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297791@lists.php.net to get a copy of this message | ||
From: Skip Evans
> HallMarc Websites wrote:
>> Actually, %5C is a \ character, % is %25
>> Why it is adding a character that is used in local address strings is
>> baffling and I think a clue as to what is going on. Is it possible it
is
>> mashing a local file address into a web address?
>
> Aha! I think that might be it. In the database it is stored as
>
>
src="/clients/client_118/images//Event%20images/Show%20ads/catspaw1compr
essed.jpg"
>
> But somehow it is converting this to a local file address
> before it is displayed.
That's the job of the browser. It takes those entities and converts them
to displayable characters. You might want to look at the htmlentities()
and related functions to put it back into the encoded version.
Bob McConnell