<?php
// Get the document root
$doc_root = filter_input(INPUT_SERVER, 'DOCUMENT_ROOT');

// Get the application path
$uri = filter_input(INPUT_SERVER, 'REQUEST_URI');
$dirs = explode('/', $uri);
$app_path = '/' . $dirs[1] . '/' . $dirs[2] . '/' . $dirs[3] . '/' . $dirs[4] . '/' . $dirs[5] . '/';
//print_r($dirs);
//echo($app_path);
// Set the include path
set_include_path($doc_root . $app_path);
?> 