Re: Use an ini file

From: Date: Fri, 08 Mar 2002 03:33:41 +0000
Subject: Re: Use an ini file
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-87729@lists.php.net to get a copy of this message
In article <3C882370.EFF36C3D@collegesherbrooke.qc.ca>, taylorjo@collegesherbrooke.qc.ca says... > > > Anyone know of an easy to use library/or code that will read and write > > > an ini file? > > See parse_ini_file() together with the file handling functions. > > Dave, > http://www.php.net/manual/en/function.parse-ini-file.php > Good, but no code to write to an ini file? > :) John I think the coder actually has to do a little bit from time to time - PHP is good but not _that_ good. Just out of curiosity, what do you think would be the algorithm for _writing to_ an ini file? How many sections does it have? What are they called? What is the structure of the entries allowed in each section? How many entries can each section have? What are the possible range of values for any entry? Rhetorical question, don't tell me. What I am saying here is that it is a lot easier to parse a file given its basic structure, than it is to create a file based on that structure but with a huge, almost infinite, number of possible entries. In other words, you'll have to roll your own, using the file functions. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#87729) next »