[Typo3-dev] PATH_TRANSLATED issues
Ingmar Schlecht
ingmars at web.de
Wed Apr 28 22:20:34 CEST 2004
Kasper Skårhøj wrote:
> About the issues.
>
> First of all, please be patient. It is a JUNGLE to get these system
> variables stable under all conditions!
What is the problem exactly?
Is it just the fact that the "path to this script" is sometimes in
PATH_TRANSLATED and sometimes in SCRIPT_FILENAME?
If that is the case, why not just try one after another.
In basic PHP this would look like:
$script_filename = $HTTP_SERVER_VARS['SCRIPT_FILENAME'];
if(!$script_filename) {
$script_filename = $HTTP_SERVER_VARS['PATH_TRANSLATED'];
}
if(!$script_filename) {
$script_filename = $HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED'];
}
if(!$script_filename) {
$script_filename = $HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME'];
}
At the end it's rather likely that $script_filename will contain the
right value.
cheers,
Ingmar
More information about the TYPO3-dev
mailing list