Re: How to set an absolute include path?
| From: | John Holmes | Date: | Mon, 27 Dec 2004 16:55:45 +0000 |
| Subject: | Re: How to set an absolute include path? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-205210@lists.php.net to get a copy of this message | ||
Brian Dunning wrote:
Is there a command that will set the include path to the web server root? I'm trying to set up a directory structure where include files will be called from all different folder depths, so I'll need to call them absolutely like: include('/includes/file.php'); where the above will work no matter from which level it's called. Thanks...That should work from anywhere it's called because it's an absolute path, but I doubt you have an "includes" directory at the root level, do you? Either way, you can set the include path in php.ini, an .htaccess file or using ini_set(). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com