parse_ini_file could be used to get configuration values from an ini file to use in the code, suppose your app changes some of those values and you want to set new defaults, is there a function to take the associative array and write the ini file over?
parse_ini_file could be used to get configuration values from an ini file to use
Share
You could use Zend Framework’s
Zend_Config_Writer_Inito write the Ini File back to file. Because Zend Framework is component library, you can use only this component without having to migrate your entire application to ZF.If you don’t mind the config not being an Ini but PHP arrays, you can also use this code to load and write back the configs:
Somewhat related question and my answer to it: