SQLconf v1.1 Readme
-------------------
Copyright (C) 2003 by Max Timchenko, http://www.maxvt.com/sqlconf/
- About SQLconf:
Writing and reading configuration for your scripts has never been so
easy. Using MySQL as the backend and a minimal, automatically updated
conf.php file, SQLconf provides a solution for all your configuration
needs.
- Installing SQLconf:
Extract the .php files in this archive to your web server. Make sure
the scripts would be able to write to conf.php file (give it corres-
ponding permissions). Run install.php, and don't forget to remove it
after installation.
- Uninstalling SQLconf:
Remove conf.php and sqlconf.php. Drop the conf table from the database.
- Functions of SQLconf:
- getConf(module, name="")
Returns a configuration value for a given module and variable name.
Your program is responsible for interpreting the value.
- If name is not set, all module values are read and returned as an
array of (name, value) pairs.
- If module/name does not exist, FALSE is returned.
- setConf(module, name, value, exported=0)
Sets the configuration value for a given module and variable name,
overwriting an existing value if the module/name existed.
- If exported is set to 1, the variable will be written into conf.php
file as a global define() with the name module_name (in uppercase).
- clearConf(module, name)
Removes the configuration value with the given module/name. If
exported was set to 1 for the value, conf.php will be recreated.
- regenConf()
Recreates the configuration file. This function (normally) should not
be called directly.
- License:
- This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License (GPL)
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- To read the license please visit http://www.gnu.org/copyleft/gpl.html
- Revision history:
- 1.1 (1 March 2003) : Changed "INSERT IGNORE" to "REPLACE" in setConf;
in regenConf, integer values are written to file without quotes, and
php-breaking values (single quote and ?>) are escaped.
End of SQLConf 1.0 Readme