Hi list! I tried the manual, the web, the archives... maybe I'm not approaching this correctly.
I use parse_ini_file() on a config.ini to fetch some settings the lame people can set using my application. I want this config file to be as simple as possible so that I won't get emails about things not working when this open source application is released. I was thinking that leaving the value of a directive blank would be good to set the default value... such as this: ; Whether or not to send reports about MySQL errors. Can be set to On, Off ; or Silent. Silent will send a report, but will not notify the user. ; Defaults to On. send_db_errors = would leave the setting 'On' because it's the default and a specific value was not entered. I fill in the defaults by checking for empty values and replacing them with the defaults for those directives. However... Setting something to 'Off' will also cause the value to be empty. So send_db_errors = AND send_db_errors = Off both return $config_ini_array['send_db_errors'] as a string(0) "". How can I see this difference? I know the php.ini file quotes the directive for default values to work. So : ;send_db_errors (note the ; at the start of the line) returns $config_ini_array['send_db_errors'] as NULL, allowing me to see the difference. But I think that might be too complicated for the future users of the system. Should I use send_db_errors = Default or something? Any ideas on this? The default values may sometimes be a bit more complex than just 'On' or 'Off', so I really need to see the difference between a user requesting the Default value or setting it to Off. TIA, Ivo -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP & MySQL programmer Leiden University Medical Centre Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php