Created
April 25, 2011 14:11
-
-
Save insidegui/940562 to your computer and use it in GitHub Desktop.
Spaghetti: configurar automaticamente banco de dados de acordo com ambiente
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
<?php | |
/** | |
* Com o environment, você pode escolher qual ambiente de desenvolvimento está | |
* utilizando. É principalmente utilizado na configuração de banco de dados, | |
* evitando que você tenha que redefiní-las a cada deploy. | |
*/ | |
if(file_exists("production.txt")) { | |
Config::write("environment", "production"); | |
} else { | |
Config::write("environment", "development"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment