[PHP] Permanently Modifying Variables

Soldato
Joined
14 Feb 2006
Posts
4,644
Location
Surrey, UK
Evening all :)

I have a config.php file for my site which, in short, contains a few variables and nothing else. These are sitewide variables and the file is included on most pages of the site.

What I'm looking at doing is being able to modify the values of these variables in config.php though a web interface.

For example in config.php:
Code:
$c_enablesite = true;

And I would like a "Disable Site" link on a page, which would then change the value of '$c_enablesite' to 'false' in config.php.

What's the best way to go about doing this? Are there any prewritten scripts or classes that could help at all?

Thanks,
Jon
 
Thanks for all the suggestions! The database method would be an easy one to set up, but I think I'll look into the XML way :)

Thanks again!
Jon
 
Back
Top Bottom