NYCPHP Meetup

NYPHP.org

[nycphp-talk] Config file format and admin suggestions

Dell Sala dell at sala.ca
Sat May 19 18:42:34 EDT 2007


On May 19, 2007, at 4:46 PM, Cliff Hirsch wrote:

> My config files are currently a bunch of define statements. I’m  
> going to change the format as I rewrite the admin back-end and am  
> looking for suggestions

ini files aren't bad. nice built-in php support with parse_ini_file()


> I’m also curious about how people go about setting available white  
> list values, default values, etc. without hardcoding them.

For validating and accessing the values I wrap the loaded config data  
in a class. I don't see how you can avoid hardcoding the default  
values or validation rules, except maybe storing those things in  
another config file.

-- Dell





More information about the talk mailing list