According to your directory tree:
This is the one I would use to LOAD PHP script, basically you can place it in index.php or in bootstrap.php
define("PROJECT_DISK_PATH", str_replace('\\', '/', dirname(dirname(__FILE__))) . '/');
/*
Server variables $_SERVER['PHP_SELF'] and $_SERVER['SCRIPT_FILE_NAME'] are both USELESS to
accomplish this task because they both return the currently executed script and not this included file path.
*/
Then in your PHP script you do:
include(PROJECT_DISK_PATH . 'path/to/your/script/somescript.php')
And these are the ones I would use to LOAD JS/CSS script IN PAGES:
define("PROJECT_DOCROOT_PATH", '/' . substr(PROJECT_DISK_PATH, strlen($_SERVER['DOCUMENT_ROOT'] . '/')));
define("PROJECT_HTTP_PATH", "http://" . $_SERVER['HTTP_HOST'] . JPL_DOCROOT_PATH);
So in your page you can do:
<script type="text/javascript" src="<?php echo PROJECT_DOCROOT_PATH; ?>path/to/your/script/somescript.js"></script>