mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
6a750aa176
commit
5bc14621ca
1 changed files with 5 additions and 0 deletions
|
@ -1051,6 +1051,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
case 'SCRIPT_FILENAME':
|
||||||
|
if (defined('SERVER_IIS') && SERVER_IIS === true){
|
||||||
|
return str_replace('\\\\', '\\', env('PATH_TRANSLATED') );
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'DOCUMENT_ROOT':
|
case 'DOCUMENT_ROOT':
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
if (!strpos(env('SCRIPT_NAME'), '.php')) {
|
if (!strpos(env('SCRIPT_NAME'), '.php')) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue