note 39467 added to function.dirname

From: Date: Thu, 29 Jan 2004 16:24:43 +0000
Subject: note 39467 added to function.dirname
Groups: php.notes 
Request: Send a blank email to php-notes+get-64382@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.dirname.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39467 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39467&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39467&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64382) next »