PHP Classes

File: ini_test.txt

Recommend this page to a friend!
  Classes of Josť Silva, Jr.  >  INI Files Handler  >  ini_test.txt  >  Download  
File: ini_test.txt
Role: Example script
Content type: text/plain
Description: Usage exemple
Class: INI Files Handler
Read and manipulate INI files configuration values
Author: By
Last change: Small fixes
Date: 7 years ago
Size: 498 bytes
 

Contents

Class file image Download
<?php

require_once 'classe.ini.php';

$ini = new ini('test.ini');
 
$ini->set('GROUP_A', 'VAR_X', 'MY_VALUE');
$ini->set('GROUP_A', 'VAR_Y', 'MY_OTHER_VALUE');
$ini->save();
 
if(
$ini->get('GROUP_A', 'VAR_X') != false)
   
$x = $ini->get('GROUP_A', 'VAR_X');
 
$ini->del('GROUP_A', 'VAR_X');
$ini->set('GROUP_B', 'VAR_X', 'OTHER_VALUE');
$ini->set('GROUP_B', 'VAR_Y', 'ANOTHER_VALUE');
$ini->save();

echo
'$x = ' . $x;
echo
'<script>window.open("test.ini", "_blank"); </script>';

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