PHP Classes

File: sample.php

Recommend this page to a friend!
  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: 18 years ago
Size: 539 bytes


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

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