Re: not so happy with include()
| From: | Chris Lee | Date: | Tue, 09 Oct 2001 15:46:52 +0000 |
| Subject: | Re: not so happy with include() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70500@lists.php.net to get a copy of this message | ||
include_once("$DOCUMENT_ROOT/include/sb.inc.php");
done.
--
Chris Lee
lee@mediawaveonline.com
"Christian Dechery" <cdechery@easynet.com.br> wrote in message
news:5.0.0.25.2.20011007191951.01d06eb0@pop3.norton.antivirus...
> I'm working in quite a BIG system in PHP now... I have up to 6 .inc.php
> (library files) so far...
>
> I have the following directory tree..
>
> /vitrine (main program files)
> /vitrine/include (include dir, where the .inc.php resides)
> /vitrine/adm (the administration panel, with login etc...)
>
> the problem is that within the files in /adm I do some requires() and
> includes()... and within the .inc.php's also... so I'd have something
like...
>
> /vitrine/adm/admin.php
> <?
> require("../include/lib.inc.php");
> require("../include/error.inc.php");
> // etc...
> ?>
>
> /vitrine/include/lib.inc.php
> <?
> require_once("../include/db.inc.php");
> // etc...
> ?>
>
> this works fine when I am at /adm... but once I move to /vitrine none of
> the includes-within-includes works because of the relative dirs... I can't
> use include_path cuz I don't have access to php.ini... what do I do???
>
> _____________________________
> . Christian Dechery
> . . Gaita-L Owner / Web Developer
> . . http://www.webstyle.com.br
> . . http://www.tanamesa.com.br
>