note 9922 deleted from function.require by sniper

From: Date: Wed, 29 Jan 2003 04:32:35 +0000
Subject: note 9922 deleted from function.require by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-43006@lists.php.net to get a copy of this message
when using require() in file that is already require()ed from different directory, it's important to remember that require() just replaces itself with contents of specified file, therefore any path in the specified file is relative to path of original file, NOT the require()ed one! and the same applies to any subsequently require()ed file, of course. little example - let's have directory with two files in it, "master.php" and "define.php", and its subdirectory "scripts" with "include.php" file. then, if master.php requires include.php, and include.php requires define.php, the line in include.php should look like this: require("define.php"); and not require("../define.php");

« previous php.notes (#43006) next »