not so happy with include()
| From: | Christian Dechery | Date: | Sun, 07 Oct 2001 22:25:48 +0000 |
| Subject: | not so happy with include() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-70305@lists.php.net to get a copy of this message | ||
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