Escape slashes?
| From: | Tanya Brethour | Date: | Mon, 12 Mar 2001 19:27:06 +0000 |
| Subject: | Escape slashes? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43521@lists.php.net to get a copy of this message | ||
Hi!
I am trying to do some fileuploading.. but I am running into a problem
with escaping spaces.
Basically, I have this directory that includes spaces and I need to be
able to change the spaces to "\ " so for example..
my directory is: Fun Documents
I need to change it to: Fun\ Documents
That way when I copy.. I wont get errors! Plus, there is always the
potential that the filename might have a space in it.
So how do I escape these spaces?
I have tried this.. and it doesnt work:
$copyto = strtr($copyto, " ", "\ ");
That basically just replaces the spaces with a backslash. I tried this as
well:
$copyto = strtr($copyto, " ", "\\ ");
Didnt work.
I am sorta clueless.. any ideas?
Thanks in advance,
Tanya