Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Axel Strembel  >  ConfigurationSettings.AppSettings  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Class implementation sample
Class: ConfigurationSettings.AppSettings
Write and read configuration files like in .NET
Author: By
Last change: Support for PHP5
Date: 2006-01-03 10:42
Size: 539 bytes
 

Contents

Class file image Download
<? 
//Include the correct version of the class
if(phpversion() < 5) require_once("ConfigurationSettings.php");
else require_once(
"ConfigurationSettingsPHP5.php");

// Create the object. Don't forget that the working directory must have
// write permissions
$appset = new AppSettings();

// Write or modify 2 variables in the Config File.
$appset->Put("name""Axel"); 
$appset->Put("lastname""Strembel"); 

// Get the value of the variables of the Config File
echo $appset->Get("name") . " " $appset->Get("lastname");
?>