Re: Displaying image paths with spaces

From: Date: Mon, 07 Sep 2009 19:46:47 +0000
Subject: Re: Displaying image paths with spaces
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-297770@lists.php.net to get a copy of this message
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/catspaw1compressed.jpg" But somehow it is converting this to a local file address before it is displayed.
BTW, IMHO using spaces in folder and/or file names is bad practice and should be avoided.
I totally agree and the code I write I always replace user's spaces with '_' characters, but this is FCKeditor's directory creation code. Maybe I should look into modifying it to do the same. I actually have already modified FCK to store images in client specific directories and found the code to be pretty well written so maybe I need to do the same and solve the problem that way. I'll check that out. Thanks Ash and Marc for the input. I think we're on the right path ;) Skip -- ==================================== Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com ------------------------------------ Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut

« previous php.general (#297770) next »