This is my way to find the rootstart. Create at ROOT start a file with name mainpath.php
<?php
## DEFINE ROOTPATH
$check_data_exist = "";
$i_surf = 0;
// looking for mainpath.php at the aktiv folder or higher folder
while (!file_exists($check_data_exist."mainpath.php")) {
$check_data_exist .= "../";
$i_surf++;
// max 7 folder deep
if ($i_surf == 7) {
return false;
}
}
define("MAINPATH", ($check_data_exist ? $check_data_exist : ""));
?>
For me is that the best and easiest way to find them. ^^