| 336 |
fclose($f); |
fclose($f); |
| 337 |
eval($code); |
eval($code); |
| 338 |
|
|
|
|
|
|
/*if (isset($_SERVER['DOCUMENT_ROOT']) AND strlen($_SERVER['DOCUMENT_ROOT'])) { |
|
|
$docroot = str_replace('\\', '/', str_replace('\\\\', '\\', $_SERVER['DOCUMENT_ROOT'])); |
|
|
} |
|
|
else {*/ |
|
|
// Find information about where execution started |
|
| 339 |
$origin = array_pop(debug_backtrace()); |
$origin = array_pop(debug_backtrace()); |
| 340 |
// Find the PHP script at the start, with a fix for Windows slashes |
// Find the PHP script at the start, with a fix for Windows slashes |
| 341 |
$absolutepath = str_replace('\\', '/', $origin['file']); |
$absolutepath = str_replace('\\', '/', $origin['file']); |
| 342 |
$localpath = $_SERVER['PHP_SELF']; |
$localpath = $_SERVER['PHP_SELF']; |
| 343 |
|
$userdir= ''; |
| 344 |
|
if (strpos($localpath,'~') !== false){ |
| 345 |
|
$userdir = substr($localpath, 0, strpos(substr($localpath,1),'/')+1); |
| 346 |
|
$localpath = substr($localpath,strpos(substr($localpath,1),'/')+1); |
| 347 |
|
} |
| 348 |
$docroot = substr($absolutepath,0,strpos($absolutepath,$localpath)); |
$docroot = substr($absolutepath,0,strpos($absolutepath,$localpath)); |
|
/*}*/ |
|
| 349 |
$mamboroot = str_replace('\\', '/', rtrim($this->rootPath, '\/')); |
$mamboroot = str_replace('\\', '/', rtrim($this->rootPath, '\/')); |
| 350 |
$this->subdirectory = substr($mamboroot, strlen($docroot)); |
$this->subdirectory = $userdir . substr($mamboroot, strlen($docroot)); |
| 351 |
|
|
| 352 |
$scheme = isset($_SERVER['HTTP_SCHEME']) ? $_SERVER['HTTP_SCHEME'] : ((isset($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS'] != 'off')) ? 'https' : 'http'); |
$scheme = isset($_SERVER['HTTP_SCHEME']) ? $_SERVER['HTTP_SCHEME'] : ((isset($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS'] != 'off')) ? 'https' : 'http'); |
| 353 |
if (isset($_SERVER['HTTP_HOST'])) { |
if (isset($_SERVER['HTTP_HOST'])) { |