PHP Classes

File: Example

Recommend this page to a friend!
  Classes of JoseX20  >  Configuracion  >  Example  >  Download  
File: Example
Role: Example script
Content type: text/plain
Description: Example Configuration
Class: Configuracion
Generate PHP scripts with configuration values
Author: By
Last change:
Date: 12 years ago
Size: 711 bytes


Class file image Download
 * Example Configuracion.php
 * Created By Jose Perez -

//Include all the class in the directory
function __autoload($file_name){

//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();

'The file '.$conf->namefile.'.php was created!';
} else {


For more information send a message to info at phpclasses dot org.