Re: include path file errors
| From: | kmh496 | Date: | Sat, 08 Apr 2006 16:02:56 +0000 |
| Subject: | Re: include path file errors | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233555@lists.php.net to get a copy of this message | ||
2006-04-08 (토), 18:20 +0900, kmh496 쓰시길:
> hi,
> my webroot is
>
> /a/b/current/
>
> i am in /a/b/current/d/file.php
>
> file.php has a line
>
> require_once ($_SERVER[document_root]."/d/common.php");
>
> common.php has a line which says
>
> require_once ($_SERVER[document_root]."/_common.php");
> // main include file for whole site
>
> it sends me no errors about missing files, but the variables inside main
> include file _common.php are not set and don't exist in file.php
>
> where is my mistake?
I am going to say this is screwed up. i can't include a file inside
another included file and access its variables. all i can do is include
the main file in every single file in a backwards manner -- reaching
down the chain -- because i find that if i do 2 includes then the
initail data is no longer included. but sometimes there is magic going
on, but then i move one file and then the whole system breaks, it makes
me crazy.
even more so because i can't explain it well because it's so freaky.
is there no tutorial on advanced php with all this include stuff?
i RTMFM but the page didn't address advanced questions like that. and
despite my english i believe i am advanced level.
thankx everybody.
joseph