fwrite-opposite function of parse_ini_file()
Moderator: General Moderators
fwrite-opposite function of parse_ini_file()
How can we write to a file line by line using fwrite. Is there any opposite action function for parse_ini_file() ? Please help.
Re: fwrite-opposite function of parse_ini_file()
http://php.net/manual/en/function.fwrite.php
Not sure what you mean by the opposite of parse_ini_file. You can't swap php_ini files on the fly.
Not sure what you mean by the opposite of parse_ini_file. You can't swap php_ini files on the fly.
Re: fwrite-opposite function of parse_ini_file()
if you send line by line and use fwrite or file_put_contents..it will do it for you...for eg for each line you can call fwrite...not sure this is what u want..
Re: fwrite-opposite function of parse_ini_file()
The OP wants
to keep the $fileName file unchanged 
Sorry no such function. You may wish to write it yourself. I think it's not so hard.
Code: Select all
fwrite_opposite_function_of_parse_ini_file($fileName, parse_ini_file($fileName));Sorry no such function. You may wish to write it yourself. I think it's not so hard.
Last edited by VladSun on Wed Feb 02, 2011 6:42 pm, edited 1 time in total.
There are 10 types of people in this world, those who understand binary and those who don't
Re: fwrite-opposite function of parse_ini_file()
Not sure what you mean by that. parse_ini_file() just takes a file (any file, not php.ini) and parses it.Jade wrote:You can't swap php_ini files on the fly.
There are 10 types of people in this world, those who understand binary and those who don't
Re: fwrite-opposite function of parse_ini_file()
Haha I totally read the manual wrong. Reading FAIL.