// Require_once is ignored if the required file has already been added by any of the include statements.
<?php
require_once 'require_oncefile.php';
?>
define('__ROOT__', dirname(dirname(__FILE__)));
require_once(__ROOT__.'whatever');
// The require_once expression is identical to require except PHP will
// check if the file has already been included, and if so,
// not include (require) it again.
<?php
define('__ROOT__', dirname(dirname(__FILE__)));
require_once(__ROOT__.'/config.php');
?>