It appears that the way require() works is it brings the file in as if the file was inline in the current script.
For a project I'm working on, I'm using a tip that I found in a tutorial where you create a configuration object and then attach default paths to that object...
<?
// env init script
class object {}
$CFG = new object();
$CFG->incdir = '/var/www/html/includes';
?>
and then in your scripts/functions, you would put something like this....
<?
global $CFG;
require("$CFG->incdir/x.inc");
?>