config main.php, divide it into some sections

Is it possible that

I want to divide the file main.php into some sections files

Separate them can take some convenient.

How to do it

etc, I want to separate the "params section", "db section"

so main.php can include params.php and db.php

in index.php you can change config,

and you can merge inside main.php or in index.php you can merge arrays

using CMap::mergeArray

decide what to merge via SetEnv for example in .htaccess

If you download 1.1.8 configs are in separated files:


return array(

	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',

        ...

	'params'=>require(dirname(__FILE__).'/params.php'),

);

dirname(FILE) <=> DIR php >= 5.3