Read variable values from Config file

My Application runs in the command line only. It such that the configuration file is needed for you to run it and anything is put into before u can run the script like licence and email , at first i could do it with the raw php file but after i convert not able to do it again, All i did was to
pass the name of the file $ini_array = parse_ini_file(‘config.ini’, true) which is amendable

Now after reading some post over here i did it like this

$filename = $_SERVER[‘DOCUMENT_ROOT’].‘CONFIG/settings.nega’;
$ini_array = parse_ini_file(realpath($filename), true);
However its finds the config file tho but its not modifiable or amendable again. its uses the previous default values even if i run it on remote Desktop making the script not able to work.

Anyone can help me pls?

Hard to really give valuable input without seeing the code involved.

First thing that comes to mind is where you are storing the file. Windows is picky about writing to certain locations like "program files " folder. Try storing in the users\public\public documents or users<name>\appdata\local<custom folder>