mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user