RE: [PHP] Re: Help with directory !
| From: | Jani Mikkonen | Date: | Fri, 30 Nov 2001 08:43:31 +0000 |
| Subject: | RE: [PHP] Re: Help with directory ! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76158@lists.php.net to get a copy of this message | ||
> The first one works both ways!O and im working on windows
> This works fine : $loc = "./doos.txt"
> This works fine : $loc = ".\doos.txt"
>
> The second one does work at all!
> Is it in the correct order/way?
How come you say "this one works fine" to the second row and in the next
deny it? Man ..
Anyway. PHP was first written unix in mind thus it use unix style
directory seperators eg / and not \. Reason is that \ is escape
character. For example \t is tab and \n is new line. But if you still
insist on using \ as directory seperator, you got to escape it using
another \, for example:
$loc = ".\\some\\dir\textfile.txt"
--
| ,_, Jani Mikkonen, Portal System Administrator, +358456700349
|(O,O) jani.mikkonen@jippiigroup.com
|( ) Public pgp key @ http://www.mikkonen.org/jani/keyw.html
+-"-"-------] Save the whales, feed the hungry and free the mallocs
|
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]