Re: [PHP] Re: Help with directory !
$loc = "doos.txt"; $loc = "files\doos.txt"; don't put .\ to reference the current directory. if you were trying to move up a directory to access 'files' then $loc= "..\files\doors.txt". Just a thought, I've coded something for a windows box once, and remember it was finicky about stuff. but then again, to the best of my memory i thought you could use forwards slashes in php code for windows too. =) - Original Message - From: "De Necker Henri" <[EMAIL PROTECTED]> To: "PHP-General (E-mail)" <[EMAIL PROTECTED]> Sent: Friday, November 30, 2001 1:37 AM Subject: RE: [PHP] Re: Help with directory ! > 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? > > > -Original Message- > From: Fred [mailto:[EMAIL PROTECTED]] > Sent: 30 November 2001 10:25 > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Help with directory ! > > > The first one looks like a *nix directory and the second one looks like a > windows direcrory. Perhaps it will work if you switch your slashes around. > > Fred > > De Necker Henri <[EMAIL PROTECTED]> wrote in message > 3A8ED7A62794D311AA7700508B6164EC08DCA3F2@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA3F2@SCPTS01... > > Hi there.Im cant just get to access a file in a directory form my > localhost > > dir. > > The file : $loc = "./doos.txt" i can access, > > > > but the following i can't : $loc = ".\files\doos.txt" > > What am i doibg wrong? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Help with directory !
> 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) [EMAIL PROTECTED] |( )Public pgp key @ http://www.mikkonen.org/jani/keyw.html +-"-"---] Save the whales, feed the hungry and free the mallocs | msg41535/pgp0.pgp Description: PGP signature
RE: [PHP] Re: Help with directory !
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? -Original Message- From: Fred [mailto:[EMAIL PROTECTED]] Sent: 30 November 2001 10:25 To: [EMAIL PROTECTED] Subject: [PHP] Re: Help with directory ! The first one looks like a *nix directory and the second one looks like a windows direcrory. Perhaps it will work if you switch your slashes around. Fred De Necker Henri <[EMAIL PROTECTED]> wrote in message 3A8ED7A62794D311AA7700508B6164EC08DCA3F2@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA3F2@SCPTS01... > Hi there.Im cant just get to access a file in a directory form my localhost > dir. > The file : $loc = "./doos.txt" i can access, > > but the following i can't : $loc = ".\files\doos.txt" > What am i doibg wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]