PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Rich Rohde   User PHP Ini File Mangement   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: EXAMPLE
Class: User PHP Ini File Mangement
Get and set configuration values from INI files
Author: By
Last change:
Date: 2 years ago
Size: 637 bytes
 

Contents

Class file image Download
<?php
require_once("TIni.php");
$ini_file = "example.ini";
if(
TIni::ini_file($ini_file,true)) echo "Success\n"; else {echo "Fail\n"; exit;}
TIni::ini_set("ini_filename",$ini_file);
TIni::ini_set("developed_by","RichWare");
TIni::ini_set('date_developed',"2/28/2022");
TIni::add_section('help');
TIni::ini_set("info","terminology");
echo
TIni::ini_get("info")."\n";
$result = TIni::ini_set("info","new terminology");
TIni::clear_section();
TIni::show_ini_array();
$value = TIni::ini_get("info");
if(
$value) echo "Value for 'info': $value."; else
echo
"No value found for 'info' with no section.\n";
TIni::show_ini_array();