Die zweite Zeile PHP-Code (nach dem error_reporting), die beim Aufruf einer TYPO3-Seite ausgeführt wird, setzt die Konstante "PATH_thisScript". Der Code im TYPO3-Core dazu sieht so aus:

define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));

Und hier ein bisschen umgebaut für diejenigen, die wissen wollen woher der Pfad denn nun jetzt wirklich kommt:

$path_translated = $_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED'];  
$script_filename = $_SERVER['ORIG_SCRIPT_FILENAME'] ? $_SERVER['ORIG_SCRIPT_FILENAME'] : $_SERVER['SCRIPT_FILENAME'];   
$PATH_thisScript = (in_array(php_sapi_name(), array('cgi', 'isapi', 'cgi-fcgi') && $path_translated) ? $path_translated : $script_filename;   
$PATH_thisScript = str_replace('//','/', str_replace('\\','/', $PATH_thisScript));   
define('PATH_thisScript', $PATH_thisScript);

Comments

This website uses disqus for the commenting functionality. In order to protect your privacy comments are disabled by default.

Enable Comments