aximbigfan
02-03-2008, 01:43 AM
Anyone know how to write configuration files in PHP?
I have though of a few ways, but non work really well.
Basically, I just want to write variables and values, to be used by a PHP app for its configuration.
For example
have a webui where the user says that they want "white" to be a background color, and "blue" be the text color. So they click on submit, and the PHP script opens config.php, and writes the following to it...
$bgcolor = "white";
$textcolor = "blue";
Chris
I have though of a few ways, but non work really well.
Basically, I just want to write variables and values, to be used by a PHP app for its configuration.
For example
have a webui where the user says that they want "white" to be a background color, and "blue" be the text color. So they click on submit, and the PHP script opens config.php, and writes the following to it...
$bgcolor = "white";
$textcolor = "blue";
Chris