<?php
//initialize class
require_once 'idproperty.class.php';
$prop= new IDProperty('./example_data/','cfg',true);
//example of getting variables
echo $prop->Get('file1','some_var_1','any "default" value here');
echo '<br />';
echo $prop->Get('file1','some_var_2',true); //<--- like this
echo '(this variable is false so you cant see it if you execute this example)<br />';
echo $prop->Get('file1','some_var_3',123); //<--- or like this
echo '<br />';
//another file
echo $prop->Get('file2','another_var',123); //<--- or like this
echo '<br />';
//getting non set variable
echo $prop->Get('file2','non_set_var','this variable isn\'t set');
echo '<br />';
//it's that easy! =)
?>
|