I had the same problem yesterday and found that if I did the following it
worked - include('../../includes/foo.php') for some reason putting 2 ..
Then the slash / makes it function properly.
RT
On 4/5/04 4:06 PM, in article Y_icc.13644$wq4.665840@news20.bellglobal.com,
"Yannick Turgeon" <nobody@nowhere.com> wrote:
[color=blue]
> Just to make sure there is no misunderstanding. You can specify a file from
> a subdirectory relatively (and not absolute). In your situation, if the
> directory "includes" is a sibling of your main file you can include foo.php
> like that:
> include('includes/foo.php') (Without the leading slash)
>
> HTH
>
> Yannick
>
> "meredith" <msnomer@spamcop.net> wrote in message
> news:msnomer-1569B1.15585705042004@dsl254-095-101.nyc1.dsl.speakeasy.net...[color=green]
>> In article <devnull-EC2171.21431705042004@news1.news.xs4all.nl>,
>> Jan Pieter Kunst <devnull@cauce.org> wrote:
>>[color=darkred]
>>> In article
>>> <msnomer-160676.15384905042004@dsl254-095-101.nyc1.dsl.speakeasy.net>,
>>> meredith <msnomer@spamcop.net> wrote:
>>>
>>>> include('/includes/foo.php');
>>>>
>>>> doesn't work, returning a Failed opening error. If I put in the full
>>>> path, it works just fine. Do site-based absolute paths not work in
>>>> general, or is it a version problem, or what?
>>>
>>> The root of an absolute path in a PHP script is the 'real' filesystem
>>> root, not the web server's 'document root'.
>>>
>>> JP[/color]
>>
>> Well, how annoying! So the only way to put in an absolute path (which is
>> necessary for subdirectories) is the append the "real" root? Bletch!
>> --
>> msnomer
>> =======
>> Cool free games and much more here:
>>
http://www.neopets.com/refer.phtml?username=msnomer[/color]
>
>[/color]