Skip to content

Instantly share code, notes, and snippets.

@legierski
Created March 16, 2013 00:35
Show Gist options
  • Save legierski/5174309 to your computer and use it in GitHub Desktop.
Save legierski/5174309 to your computer and use it in GitHub Desktop.
.production / .development switch for your PHP codebase
if(file_exists('.production')) {
define('ENVIRONMENT', 'production');
}
else if(file_exists('.development')) {
define('ENVIRONMENT', 'development');
}
else {
exit('Missing .production/.development file.');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment