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 Henrique Mayer  >  Simple INI  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample code
Class: Simple INI
Read, modify and generate .INI configuration files
Author: By
Last change:
Date: 2005-10-11 13:59
Size: 533 bytes
 

Contents

Class file image Download
<?php
    
include_once('Ini.class.php');
    
$objIni = new IniParser'sample.ini' );

    echo 
$objIni->getValue('foo') . "\n";
    echo 
$objIni->getValue('bar') . "\n";
    echo 
$objIni->getValue('dummy') . "\n";

    
$objIni->setValue('foo''foo');
    
$objIni->setValue('bar''bar');
    
$objIni->setValue('dummy''"Master system :)"');

    echo 
"#### Split ####\n";

    echo 
$objIni->getValue('foo') . "\n";
    echo 
$objIni->getValue('bar') . "\n";
    echo 
$objIni->getValue('dummy') . "\n";

    
$objIni->saveFile();
?>