https://github.com/poen0121/csv
Open source PHP library.
https://github.com/poen0121/csv
csv php php-library
Last synced: 8 months ago
JSON representation
Open source PHP library.
- Host: GitHub
- URL: https://github.com/poen0121/csv
- Owner: poen0121
- Created: 2017-05-02T07:09:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-15T09:00:21.000Z (over 7 years ago)
- Last Synced: 2025-03-08T15:50:08.479Z (about 1 year ago)
- Topics: csv, php, php-library
- Language: PHP
- Homepage:
- Size: 54.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# csv
PHP Library ( PHP >= 5.2 ) CLI,CGI
> About
Comma separated values file processing.
Type file extension is csv.
Opens the file lock mode allows you to perform a simple reader/writer model which can be used on virtually every platform (including most Unix derivatives and even Windows).
Opens the file lock mode remember to use close function release locks and resources.
Resolving BIG5 conflicts ASCII.
> Learning Documents
Please read `readme.php` document.
> Example
Save File
--------------------------------------------------------------
$hpl_csv=new hpl_csv('big5//ignore','utf-8');
$fp=$hpl_csv->open('test.csv','w');
$hpl_csv->puts($fp,array('test','1'));
$hpl_csv->puts($fp,array('test','2'));
$hpl_csv->puts($fp,array('test','3'));
$hpl_csv->close($fp);
Load File
--------------------------------------------------------------
$fp=$hpl_csv->open('test.csv','r');
while($data=$hpl_csv->gets($fp))
{
print_r($data);
}
$hpl_csv->close($fp);