Created
April 12, 2014 20:22
-
-
Save birnam/10554925 to your computer and use it in GitHub Desktop.
local env not correct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$env = $app->detectEnvironment(function () use ($app) { | |
// Possible Environments: | |
// - local | |
// - test | |
// - stage | |
// - production (default) | |
var_dump(gethostname()); | |
preg_match("/karefirst\\/([a-z]+)/usm", __FILE__, $match); | |
// If on the web server, parse from path | |
if (isset($match[1])) { | |
return $match[1]; | |
} | |
return $app->detectEnvironment(array( | |
'local' => ['localhost','cmMBPr.local','codeinvim.local'] | |
)); | |
}); | |
// outputs: | |
// | |
// string(15) "codeinvim.local" | |
// Current application environment: site | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment