04 July 2010

Config.ini vs. config.php - Combining both

Прочети тази статия на български

Not long ago I wrote an article about using INI files as settings containers for PHP scripts (you can read it here - Config.ini vs. config.php).

I wrote a small PHP module which takes an INI file and produces a PHP file, containing all the INI parameters and values as constants definitions.

The module is really easy to set up and work with so if you need a quick way to add settings to your script without having to search PHP files for lines such as $database = 'not_anymore'; or define('DEFAULT_DIRECTORY', './res'); everytime you need to check or to change options, you can use my (proudly presented) PHP-INI configuration parser (its name happened to be a little longer than the PHP code it consists of). You can download it as a RAR archive from this link: Config 0.1beta.

As you can see, it's only version 0.1 and still beta (which will stay like this until at least one or two readers actually stop by this blog, happen to read this article, and on top of that decide to download and try my piece of code. And to post a comment with their opinion, maybe? Pretty please?), but I will see to further improvements, adding new features and so on. When and if I have the time for it.

No comments:

Post a Comment