Re: Re: Working with a config file

From: Date: Tue, 21 Feb 2006 04:35:09 +0000
Subject: Re: Re: Working with a config file
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-230784@lists.php.net to get a copy of this message
On Tue, 2006-02-21 at 00:14 +0100, Jens Kleikamp wrote: > Benjamin Adams wrote: > > I'm trying to parse a config file, example of the config is: > > [fred] > > id=8782 > > section=s1 > > years=4 > > download1=mirror1 > > > > [frank] > > id=8372 > > section=s3 > > years=4 > > download1=mirror12 > > download2=mirror2 > > . Config files of this type in PHP anyway, are generally generated by the PEAR Config package. Luckily for you it works both ways (creating and reading the files) so its really easy to work with. The Config package also supports all sorts of nifty features that will make your life easier working with this file. HTH --Paul

« previous php.general (#230784) next »