note 39467 deleted from function.dirname by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 19:08:13 +0000 |
| Subject: | note 39467 deleted from function.dirname by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142274@lists.php.net to get a copy of this message | ||
Note Submitter: andrew at i dot love dot spam dot majiclab dot com
----
I am not understanding why everyone seems to want to use relative includes so much.
<?php
include("{$_SERVER['DOCUMENT_ROOT']}/includes/my_include.php");
?>
That will work in any script that is in any single folder on your entire website. No relative paths
to mess with. You can just put all your includes in the same folder, and have different names for
them if you want.