note 15236 deleted from function.include by sniper
| From: | sniper@php.net | Date: | Wed, 29 Jan 2003 04:06:25 +0000 |
| Subject: | note 15236 deleted from function.include by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42976@lists.php.net to get a copy of this message | ||
Some of these comments make includes seem quite messy and difficult. This is not the case...
Options do and have existed, at least for php4 users, to make a->b->c includes quite painless.
You can absolute path everything with $DOCUMENT_ROOT
or
Change the include directory in php.ini
or
For virtual hosted sites with apache, add
php_value include_dir ".:/path1:/path/two"
inside your <VirtualHost> or <Directory> tags...
[Editor's note: You can even add a 'php_value include_dir
".:/path1:/path/two"' in your .htaccess file, so this solution is also available if
you don't have control over the server
--jeroen]
All these options make includes extremely simple.
If you define paths, a simple
include("whatever.inc") will search all the paths, in order, for whatever.inc