Re: fopen: space character in filename
| From: | Stut | Date: | Fri, 28 Jul 2006 21:15:29 +0000 |
| Subject: | Re: fopen: space character in filename | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239865@lists.php.net to get a copy of this message | ||
Christian Calloway wrote:
> this seems like an easy question, but I could sure as hell couldn't find any
> responces to it through initial searched. I am running php on an XP system
> and I need to open a file contained with a set of directories which may or
> may not have a space character; so for example:
>
> fopen ("X:\Dont Talk\About\My Momma\please.txt", "x");
>
> I tried using \ characters, no luck (even attempted to cancel out the
> backspace characters ala \\ and http space code %20, and still nothing.) Any
> ideas?
Spaces aren't your problem here, the \'s are. You need to escape them...
fopen ("X:\\Dont Talk\\About\\My Momma\\please.txt", "x");
-Stut