Re: Re: Working directory of PHP pages?
| From: | 9el | Date: | Thu, 12 Mar 2009 05:57:07 +0000 |
| Subject: | Re: Re: Working directory of PHP pages? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289915@lists.php.net to get a copy of this message | ||
On Thu, Mar 12, 2009 at 11:47 AM, Clancy <clancy_1@cybec.com.au> wrote:
>
> Something Stewart said the other day made me realise that there was a
> fundamental error in
> the way I was thinking about this question. I had been thinking that
> opendir (.) opened
> the root directory, and that paths such as Joe/Nurg.com were relative to
> the root
> directory, but I now realise that they are relative to the current
> directory, whatever
> that might be. (Yes; I should have known better, but there is an awful
> swamp of burnt out
> brain cells at the bottom of my brain.)
a dot (.) denotes a current directory and double dot (..) denotes parent
directory of the current in DOS/Windows/*nix File System.
>
>
> So the question I should have asked was "When a web page is loaded, can I
> rely on the CWD
> being the directory containing index.php (or whichever file is actually
> loaded)?"
>
> Thank you all for your assistance.
>
>
>