From bfea966a1443aa6952183ed65395d7a5cc6ecdbe Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 16 Jan 2014 14:15:34 +0000 Subject: [PATCH] Replace on SCRIPT_FILENAME By replacing on this rather than __FILE__, we have a full file path and can actually exclude the current working folder --- lib/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/settings.php b/lib/settings.php index 0bfec94..3458932 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -79,7 +79,7 @@ if ($_SESSION['loggedIn']) { } // Establish the dir ICEcoders running from -$ICEcoderDirFullPath = rtrim(str_replace("\\","/",dirname(__FILE__)),"/lib"); +$ICEcoderDirFullPath = rtrim(str_replace("\\","/",dirname($_SERVER['SCRIPT_FILENAME'])),"/lib"); $rootPrefix = '/'.str_replace("/","\/",preg_quote(str_replace("\\","/",$docRoot))).'/'; $ICEcoderDir = preg_replace($rootPrefix, '', $ICEcoderDirFullPath, 1);