An easy way not to have to choose between hard-coding full paths and using relative paths is either via this line:
<?php
define('DIR_ROOT', dirname(__FILE__));
require(DIR_ROOT . '/relative/to/bootstrap.php');
?>
or if you have to use a relative path:
<?php
require(dirname(__FILE__) . '/relative/to/this_file.php');
?>
This way all your paths will be absolute, yet you can move the application anywhere in the filesystem.
BTW, each successive call to dirname takes you one step up in the directory tree.
<?php
echo __FILE__;
echo dirname(__FILE__);
echo dirname(dirname(__FILE__));
?>