//////////////////// // Find the include directory and set the relative path to it. //////////////////// $inc_dir = 'include'; while (!is_dir($inc_dir)) { $relpath .= '../'; $inc_dir = $relpath . 'include'; if ($relpath == '../../../../../') { $relpath=''; break; } } ?>