Revision #3 was created by Zolter on Dec 25, 2009, 11:22:35 AM.
russian link
Content
[...]
In order to run the application in different modes (production, development, or testing), we should use the corresponding configuration in the entry script. To save the trouble of constantly modifying the entry script to switch the mode, we can create an entry script for each mode. For example, we can have `index.php`, `index-dev.php` and `index-test.php`, corresponding to production, development and testing mode, respectively. In production, we use `index.php` in the browser URL to access the application; in development, we use `index-dev.php` and in testing, we use `index-test.php`.
In a team development environment managed with some source control system (e.g. SVN, CVS, GIT), each developer may want to have his own application configuration (e.g. because he may have a different DB connection setting). In this case, we should only store `main.php` in the repository. The rest of the configuration files should only be kept in each developer's file system to avoid conflict of development configuration changes.
> Tip: The same technique may also be applied to other PHP-based configurations. For example, if we store application parameters (accessed via `Yii::app()->params`) in a PHP file, we can use the above technique to customize parameters in different modes.