Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Reading Your User's Mind...er, Config
Jan 31, 2003 @ 13:23:50

So, you've written a great PHP application that runs on just about anything out there. The install is as simple as a single script that drops all the directories and files in the right places, and, usually, there'll be lots of options that you'll ask the user for on install. The problem arrises when you try to store these options in some useful format. That's where this new DevShed article can help...

In Easy Application Configuration With patConfiguration, they show you how to use the patConfiguration tools to create a new piece in your application that will ease the task of reading, writing and maintaining application configuration files. As a tool designed to assist in the manipulation of data, it fully supports the XML data markup toolkit, and is capable of producing configuration files in both XML and PHP format. It supports a variety of different data types for configuration values, comes with the ability to link configuration variables together, and supports caching of configuration data for better performance.

Sure, you could write your own XML parser, plug that into your site, and then create the special config files for it all - but why bother when there's already a tool like this out there? It looks like a snap to use, and you can have it up and working with your app in no time flat. Of course, this article gives you some great sample code to get it all working, and includes information on the standard PHP config files, caching the contents of the file (less overhead), and some other additional resources to help you get going that much faster....

tagged:

Link:


Trending Topics: