| 333 |
eval($code); |
eval($code); |
| 334 |
|
|
| 335 |
|
|
| 336 |
if (isset($_SERVER['DOCUMENT_ROOT']) AND strlen($_SERVER['DOCUMENT_ROOT'])) { |
/*if (isset($_SERVER['DOCUMENT_ROOT']) AND strlen($_SERVER['DOCUMENT_ROOT'])) { |
| 337 |
$docroot = str_replace('\\', '/', str_replace('\\\\', '\\', $_SERVER['DOCUMENT_ROOT'])); |
$docroot = str_replace('\\', '/', str_replace('\\\\', '\\', $_SERVER['DOCUMENT_ROOT'])); |
| 338 |
} |
} |
| 339 |
else { |
else {*/ |
| 340 |
// Find information about where execution started |
// Find information about where execution started |
| 341 |
$origin = array_pop(debug_backtrace()); |
$origin = array_pop(debug_backtrace()); |
| 342 |
// 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 |
| 343 |
$absolutepath = str_replace('\\', '/', $origin['file']); |
$absolutepath = str_replace('\\', '/', $origin['file']); |
| 344 |
$localpath = $_SERVER['PHP_SELF']; |
$localpath = $_SERVER['PHP_SELF']; |
| 345 |
$docroot = substr($absolutepath,0,strpos($absolutepath,$localpath)); |
$docroot = substr($absolutepath,0,strpos($absolutepath,$localpath)); |
| 346 |
} |
/*}*/ |
| 347 |
$mamboroot = str_replace('\\', '/', rtrim($this->rootPath, '\/')); |
$mamboroot = str_replace('\\', '/', rtrim($this->rootPath, '\/')); |
| 348 |
$this->subdirectory = substr($mamboroot, strlen($docroot)); |
$this->subdirectory = substr($mamboroot, strlen($docroot)); |
| 349 |
|
|