O2File is an Open Source PHP File Workshop Libraries. It's very helpfull for reading or writing a file. Another amazing product from , released under MIT License. O2File is build for working more powerfull with O2System Framework, but also can be used for integrated with others as standalone version with limited features.
- INI File
- JSON File
- XML File
- CSV File
- Zip File
More will be coming soon, such as YAML, RAR and etc.
The best way to install O2File is to use Composer
composer require o2system/o2file:'dev-master'
use O2System\File\Factory\Ini;
// Read ini file
$ini_file_path = 'path/to/your/file.ini;
$content = Ini::read($ini_file_path, 'array'); // return as array
// Write ini file
$content = array(
'Foo' => 'Bar'
);
Ini::write($ini_file_path, $content);
// produces file with content: Foo = "Bar"
// Read file info
use O2System\File;
$info = File::info($ini_file_path);
// returns array of usefull file info metadata
More details at the Wiki. (Coming Soon)
Please kindly mail us at [email protected] or [email protected].
Please kindly submit your issues at Github so we can track all the issues along development.
- PHP 5.4+
- Composer
- ZZIPlib library by Guido Draheim (For Zip File Factory)
- Zip PELC extension (For Zip File Factory)
- Founder and Lead Projects: Steeven Andrian Salim (steevenz.com)