O zaman benim yerel sitede çalışırken için development, ve production - Ben sadece çalışan ne çevre için bir anahtarı eklediğiniz bir PHP Web sitesi üzerinde çalışıyorum web barındırma canlı çalışıyor:
<?php
define('ENV','development');
//or
define('ENV','production');
Ben Mercurial ile VC altında site var, ve genellikle sadece hg push (sunucu çok hg çalışır) ile sitemde dağıtmak, ancak bu anahtarın eklenmesi ile, "üretim" site her zaman farklı olacaktır canlı dağıtılan sürümü her zaman production yerine ayarlanmış olacağını in "kalkınma" site development.
Bu benim dağıtım süreci gider gelir
- Geliştirmek
- Test
hg commit -m "Made changes"hg pushssh host hg update- Go karşı 1.
karşı
- Geliştirmek
- Test
hg commit -m "Made changes"- Change
developmentkarşıproduction - `Hg-m commit" dev -> eşya "
hg pushssh host hg update- (Daha sonra :) değişim
production->development hg commit -m "prod -> dev"- Go karşı 1.
Hangi tabii ki büyük değildir.
Is there some way karşı keep one insulated from the other, so that the live site will always be set karşı production and my local copy set karşı development?