note 37686 deleted from function.require by nlopess
| From: | nlopess@php.net | Date: | Sat, 27 Dec 2003 11:53:30 +0000 |
| Subject: | note 37686 deleted from function.require by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62548@lists.php.net to get a copy of this message | ||
Note Submitter:
----
I've noticed that nobody has mentioned a better way of making a require/include[_once] global.
Simple:
<?
require $_SERVER['SITE_HTMLROOT'] . '/path/to/file';
// or include() or _once()
// if older PHP:
require $HTTP_SERVER_VARS['SITE_HTMLROOT'] . '/path/to/file';
// or set $HTTP_SERVER_VAR['SITE_HTMLROOT'] to a global variable
?>