note 35546 deleted from function.require by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 00:44:38 +0000 |
| Subject: | note 35546 deleted from function.require by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59817@lists.php.net to get a copy of this message | ||
Note Submitter: john at interactivate dot com
----
I work on a wide variety of websites in a number of hosting environments that are subject to change
without notice. In order to bypass php's include path, I always use:
require getenv("DOCUMENT_ROOT")."/path/to/include/file.php";
This allows me to keep all my include files in the webspace for that particular site (and I never
worry about what happens if somebody changes the php.ini, or if I move the site to a different host,
etc.) without having to put relative paths in my include directives.