forked from extern/egroupware
PHP5 fixes
This commit is contained in:
parent
40f5256cee
commit
8d704fe5c0
@ -39,7 +39,8 @@
|
|||||||
// variable uses forward slashes. If it does not, you'll have to tweak
|
// variable uses forward slashes. If it does not, you'll have to tweak
|
||||||
// this.
|
// this.
|
||||||
if (isset($_SERVER['PHP_SELF'])) {
|
if (isset($_SERVER['PHP_SELF'])) {
|
||||||
$webroot = strstr(dirname(__FILE__), '/' . array_shift(preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY)));
|
$parts = preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY);
|
||||||
|
$webroot = strstr(dirname(__FILE__), '/' . array_shift($parts));
|
||||||
if ($webroot !== false) {
|
if ($webroot !== false) {
|
||||||
$webroot = preg_replace(';/config$;', '', $webroot);
|
$webroot = preg_replace(';/config$;', '', $webroot);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user