Bug #17271 » cli_dispatch.phpsh.patch
cli_dispatch.phpsh (working copy) | ||
---|---|---|
// This will work as long as the script is called by it's absolute path!
|
||
$temp_PATH_thisScript = isset($_SERVER['argv'][0]) ? $_SERVER['argv'][0] : (isset($_ENV['_']) ? $_ENV['_'] : $_SERVER['_']);
|
||
define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
|
||
// Alternatively, in some environments, we might be able to figure out the absolute path (with no "../" and "./" in) from environment variables...
|
||
if ($temp_PATH_thisScript{0}!='/') {
|
||
if ($temp_PATH_thisScript{0}!='/' && TYPO3_OS!='WIN') {
|
||
$temp_CURRENT_DIR = $_SERVER['PWD'].'/';
|
||
$temp_PATH_thisScript = $temp_CURRENT_DIR.ereg_replace('\.\/','',$temp_PATH_thisScript);
|
||
if (!@is_file($temp_PATH_thisScript)) {
|
||
... | ... | |
echo 'ERROR: Nothing to include.'.chr(10);
|
||
exit;
|
||
}
|
||
?>
|
||
?>
|