<?php 
/* 
 * Example Configuracion.php 
 * 
 * Created By Jose Perez - http://www.codigo-source.net/ 
 * 
 */ 
 
//Include all the class in the directory 
function __autoload($file_name){ 
    include"$file_name.php"; 
} 
 
//Create the object 
$conf = new Configuracion("config"); 
 
//Add variable and value without '$' as String 
//The first value always must String 
$conf->addVariable("name", "Joseph"); 
$conf->addVariable("country", "Chile"); 
//Number Value 
$conf->addVariable("age", 21); 
//Boolean Value must write as strings 
$conf->addVariable("isdead", 'false'); 
 
//Write the file 
$bool = $conf->generarArchivo(); 
 
if(!$bool){ 
    echo 'The file '.$conf->namefile.'.php was created!'; 
} else { 
    echo 'Error!'; 
} 
 
?> 
 
 |