PHP Classes

User PHP Ini File Mangement: Get and set configuration values from INI files

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 21 All time: 11,179 This week: 488Up
Version License PHP version Categories
tini 1.0Freeware7Files and Folders, Configuration, Par...
Description 

Author

This package can get and set configuration values from INI files.

It can open a given INI file read the configuration values that it may contain.

The class can also get values with the given names, set change values, add sections and save the updated configuration values to the INI file.

Picture of Rich Rohde
  Performance   Level  
Name: Rich Rohde <contact>
Classes: 3 packages by
Country: United States United States
Age: ???
All time rank: 4185532 in United States United States
Week rank: 295 Up34 in United States United States Up

Example

<?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();


  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example EXAMPLE
Plain text file TIni.php Class INI MANAGEMENT

 Version Control Unique User Downloads Download Rankings  
 0%
Total:21
This week:0
All time:11,179
This week:488Up