note 23837 deleted from function.include by sniper

From: Date: Wed, 29 Jan 2003 04:13:59 +0000
Subject: note 23837 deleted from function.include by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-42989@lists.php.net to get a copy of this message
Locating your include directory if you have it at the same level as your root directory (www or htdocs or html_public etc.). Lets say your include directory is named 'include'. Place an include file named IncludePath.inc in your root directory with the following: <?php global $IncludePath; $IncludePath = dirname($DOCUMENT_ROOT) . "/include/"; ?> Now, when you create a new page anywhere in your root directory tree type this in your page: <?php include($DOCUMENT_ROOT . "IncludePath.inc"); #now lets say you want to include a file called dbpassword.inc from your include directory include($IncludePath . "dbpassword.inc"); #and so on... ?> This helps me out so much when I'm maintaining more that one domain. BAN

« previous php.notes (#42989) next »