loadConfig() method
<?php
function loadConfig(
$filename
)
?>
A really easy way to configure the layout and other settings for a form: just create a simple .ini textfile, and you're ready to go! Clonefish has a simple built-in parser for .ini files, since the built-in PHP function (parse_ini_file) lacks a few features we would need.
Sample config file:
; layout settings layout = tabular layouts.tabular.buttonrow =<tr><td colspan="2"></td><td>%s</td></tr>n layouts.tabular.element =<tr %errorstyle%><td width="120" align="rig [...] layouts.tabular.button =<input type="submit" value="%s" /> layouts.tabular.container = <table cellpadding="5" cellspacing="0" border="0"> %s </table>
Features:
- use the = character to separate the name and value
- use the . character to identify arrays of any depth
- use the ; character to include comments
- use empty lines to keep the file easy to read
- everything after the first = character is treated as the value of the setting: no need to use " characters, you still have all the characters at your hand (you can still escape " or ' characters)
- feel free to use \n, \r and \t !
- you can use multiline settings: just indent the second and further lines with a space or a tab!
