diff --git a/main.php b/main.php index 82a89ab2f..a7eeaafc8 100644 --- a/main.php +++ b/main.php @@ -30,6 +30,17 @@ * @see Director::direct() */ +/** + * Include _ss_environment.php file + */ +$envFiles = array('../_ss_environment.php', '../../_ss_environment.php', '../../../_ss_environment.php'); +foreach($envFiles as $envFile) { + if(@file_exists($envFile)) { + include($envFile); + break; + } +} + /** * Include Sapphire's core code */ @@ -86,14 +97,6 @@ if(Director::isDev()) { Session::start(); -$envFiles = array('../_ss_environment.php', '../../_ss_environment.php', '../../../_ss_environment.php'); -foreach($envFiles as $envFile) { - if(@file_exists($envFile)) { - include($envFile); - break; - } -} - if(isset($_GET['url'])) { $url = $_GET['url'];