Adding fix for #2683, $_SERVER['SCRIPT_FILENAME'] not available in some installations of IIS

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5405 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-07-08 17:41:33 +00:00
parent 6a750aa176
commit 5bc14621ca

View file

@ -1051,6 +1051,11 @@
}
switch ($key) {
case 'SCRIPT_FILENAME':
if (defined('SERVER_IIS') && SERVER_IIS === true){
return str_replace('\\\\', '\\', env('PATH_TRANSLATED') );
}
break;
case 'DOCUMENT_ROOT':
$offset = 0;
if (!strpos(env('SCRIPT_NAME'), '.php')) {