Re: Re:not so happy with include()
| From: | Christian Dechery | Date: | Mon, 08 Oct 2001 00:37:19 +0000 |
| Subject: | Re: Re:not so happy with include() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70311@lists.php.net to get a copy of this message | ||
this doesn't solve my problem... I tought of that...
what if someone gets my system and install it under /whatever instead of /vitrine...??? then NO include at all will work?
I need relative includes that will work regardless of the dir in which my system is under the webroot... that is the problem...
but thanks anyway... I'll keep trying something ( haven't come up with a thing so far... :( )
require ("$DOOCUMENT_ROOT/vitrine/adm/admin.php"); HTH, Bojan Christian Dechery <cdechery@easynet.com.br> wrote: 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 <?_____________________________ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.brrequire("../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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net