Re: Easy question, I am drawing a blank.
- From: "Michael Phipps" <gravityspike_spamfree_@xxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 08:36:18 +1000
> Been up coding for hours now, and having one of those easy problems
> that I can't figure out. I have the following server setup:
>
> /home/jj/public_html/dev/nn.com
>
> Under n.com folder, I have a file:
>
> ext.inc
> config.php
> test.php
>
> I am trying to setup a variable called $root_path that I can set in
> config.php and be used throughout my app (any folder) and still point
> to the root.
>
> In test.php, I have the following lines:
> $root_path = '/dev/nn.com/';
> if (!file_exists($root_path . 'ext.inc'))
> {
> die ('$root_path is wrong.');
> }
>
> And it always errors out. I have tried 'dev/nn.com'. I can't use './'
> because it has to work from a sub-directory. I can't use
> '/home/jj/public_html/dev/nn.com' because this is also used for images
> in template files, so I need a relative link to the web root. Can
> anyone help me with what to set root path to?
>
> Thanks a lot. I am so frustrated!
>
> JJ
$root_path = $_SERVER['DOCUMENT_ROOT'].'/dev/nn.com/';
.
- Follow-Ups:
- Re: Easy question, I am drawing a blank.
- From: DJ Majestik
- Re: Easy question, I am drawing a blank.
- References:
- Easy question, I am drawing a blank.
- From: DJ Majestik
- Easy question, I am drawing a blank.
- Prev by Date: Re: exec() function in PHP
- Next by Date: Re: Easy question, I am drawing a blank.
- Previous by thread: Easy question, I am drawing a blank.
- Next by thread: Re: Easy question, I am drawing a blank.
- Index(es):