Configuration File Processing with PHP
(Page 1 of 4 )
In this tutorial Timothy shows you how to work with configuration files with PHP.
A lot of PHP scripts are written as quick and dirty solutions to specific problems. Occasionally a programmer may encase his or her set of functions within a class for future use or to share with others, but often times these scripts and classes will go about performing their routines without variation. For the script to change it's performance, one could write his or her script to rely upon a configuration file.
A configuration file is an external file, usually in a plain text format though it can also be in a binary format. It is read by a program or script upon startup and the values within the file influences how the program behaves.
In this tutorial I'll take a brief look at how to read in two common types of configuration files and parse them into arrays so that they can be used by the program.
Next: A Simple Configuration File >>
More Miscellaneous Articles
More By bluephoenix