<?
require('class.inifile.inc');
if ($ini = new inifile('demo.ini',TRUE))
{
$ini->set_key('Demo','Last Run',date('d.m.Y,H:i:s'));
$ini->set_key('Demo','Background',"gray");
$ini->set_key('Demo','Font',"'courier new',courier,monospace");
$ini->set_key('Demo','FSize',"12px");
$ini->set_key('Demo','Color',"silver");
$ini->set_key('TMPSECTION','TMPVALUE',date('d.m.Y,H:i:s'));
print "<pre>\n".$ini->listall()."</pre>\n";
$ini->del_key('TMPSECTION','TMPVALUE');
$ini->del_sec('TMPSECTION');
print "<html>\n\t<head>\n\t\t<title>PHP inifile Demo</title>\n\t";
$bg = $ini->get_key("Demo","Background","white");
$fg = $ini->get_key("Demo","Color","Black");
$ft = $ini->get_key("Demo","Font","Times");
$fs = $ini->get_key("Demo","FSize","Times");
print "<body style=\"fontweight:bold;background:".$bg.";font:".$ft.";font-size:".$fs.";color:".$fg.";\">\n";
print "\t\t<pre>\n";
print $ini->listall()."\n";
print "\t\t</pre>\n\t</body>\n</html>";
}
?>
|