Login   Register  
PHP Classes
elePHPant
Icontem

File: readme.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kozak Andrey  >  iniRWC  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: Readme
Class: iniRWC
Read and write configuration settings in INI files
Author: By
Last change:
Date: 2005-01-02 16:08
Size: 2,193 bytes
 

Contents

Class file image Download
iniRWC CLASS

This class will help you with settings in your programms. It can Read, Create and Change ini files. Also If you have variables in php files you can change it's value or add new, include this file and use your variables.

Class has 2 variables and 9 functions.

Variables:
	readError - this variable contains error messages of reading actions;
	writeError - this variable contains error messages of writing actions;

Functions:
	array ReadIni(string filename) - main function for reading Ini file;
	int WriteIni(string filename, array iniarray) - main function for writing Ini file;
	int WritePhp(string filename, array iniarray [, string prefix]) - main function for writing Php file;
	int ChangeIni(string filename, array inihash) - main function for changing Ini file;
	int ChangePhp(string filename, array inihash) - main function for changing Php file;
	array ReadFile(string filename) - read file;
	array ReadPhp(string filename) - function for reading Php file;
	array iniParse(array file) - parse ini file;
	array phpParse(array file:array) - parse php file;

FILE LISTING:
	iniRWC.inc.php - class file;
	ex01.php - example of reading simple ini;
	ex02.php - example of writing simple ini;
	ex03.php - example of changing simple ini;
	ex04.php - example of writing php;
	ex05.php - example of changing php;
	read_test.ini - ini file for ex01.php example;
	test.ini - ini file for ex02.php and ex03.php examples;
	test.php - php file for ex04.php and ex05.php examples;
	examples.html - examples listing;
	readme.txt - this file :-)

Installation:
Copy all files into your server. Get 0777 or rwxrwxrwx rights on files read_test.ini, test.ini and test.php.

For Examples please open examples.html

Information of work with class.
With ini files:
-all lines that start with ';' or '[' will be removed;
-all ' ' and '\t' will be removed at the end of key and at the start of value;

With php files:
-you can use a prefix for your variables in writing;

!!!WARNING!!!
THIS CLASS CAN WRITE PROPERLY ONLY IN PHP FILES THAT WAS CREATED BY ITSELF! PLEASE, LOOK EXAMPLES!!!

If you have questions please contact me admin@trek.dp.ua