shuchkin/simplecsv 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shuchkin/simplecsv

最新稳定版本:1.0.1

Composer 安装命令:

composer require shuchkin/simplecsv

包简介

Parse and retrieve data from CSV files. Export data to CSV.

README 文档

README

Parse and retrieve data from CSV files. Save array to CSV file. See XLSX reader here, XLS reader here,

Sergey Shuchkin sergey.shuchkin@gmail.com 2015-2023

Basic Usage

if ( $csv = Shuchkin\SimpleCSV::parse('book.csv') ) {
	print_r( $csv->rows() );
}
Array
(
    [0] => Array
        (
            [0] => ISBN
            [1] => title
            [2] => author
            [3] => publisher
            [4] => ctry
        )

    [1] => Array
        (
            [0] => 618260307
            [1] => The Hobbit
            [2] => J. R. R. Tolkien
            [3] => Houghton Mifflin
            [4] => USA
        )

)

Installation

The recommended way to install this library is through Composer. New to Composer?

This will install the latest supported version:

$ composer require shuchkin/simplecsv

or download class here

Debug

ini_set('error_reporting', E_ALL );
ini_set('display_errors', 1 );

$csv = Shuchkin\SimpleCSV::import('books.csv');
print_r( $csv->rows() );

Export

$items = [
	['ISBN', 'title', 'author'],
	['618260307','The Hobbit','J. R. R. Tolkien']
];
$csv = Shuchkin\SimpleCSV::export( $items );
echo '<pre>' . $csv . '</pre>';
/*
ISBN,title,author
618260307,The Hobbit,J. R. R. Tolkien
*/

History

1.0 (2023-08-27)

  • used namespace now: Shuchkin\SimpleCSV
  • fixed delimiter detection

0.2 (2023-07-27)

  • fix 8x deprication Passing null to parametr
  • added static methods SimpleCSV::parse, SimpleCSV::parseFile, SimpleCSV::parseData

0.1.1 (2021-04-28) fix 7.4 deprication error
0.1 (2018-12-20) GitHub realese, composer

统计信息

  • 总下载量: 82.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 52
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 51
  • Watchers: 1
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固