Re: Includes inside includes
| From: | Website Managers.net | Date: | Sun, 21 Dec 2003 08:16:54 +0000 |
| Subject: | Re: Includes inside includes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173096@lists.php.net to get a copy of this message | ||
To call the file from anywhere within the document space, try this:
include($_SERVER["DOCUMENT_ROOT"]."/common/setup.inc");
Jim
----- Original Message -----
From: "Robbert van Andel" <r_vanandel@yahoo.com>
To: <php-general@lists.php.net>
Sent: Sunday, December 21, 2003 1:41 AM
Subject: [PHP] Includes inside includes
| I've written a class that is calling an include
| function to include a setup file. The problem is that
| the setup file is in another directory than the class.
| I'm including the file using:
|
| include ("../common/setup.inc");
|
| Is there a way that i can make the relative path
| inside the class definition specific to the class
| definition, not the page that is including the class
| definition. I have trouble when I include the class
| definition. I get an error that it cannot include
| "../common/setup.ini" whenever the class is called
| from a directory above common.
|
| I hope this makes sense. and thanks for your help.
|
| Robbert van Andel
|
|
| __________________________________
| Do you Yahoo!?
| New Yahoo! Photos - easier uploading and sharing.
| http://photos.yahoo.com/
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
|
|