bolstad/csv-parser 问题修复 & 功能扩展

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

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

bolstad/csv-parser

Composer 安装命令:

composer require bolstad/csv-parser

包简介

Simple system for parsing CSV-files row by row and sending the data to a callback

README 文档

README

Introduction

A simple system for parsing CSV-files row by row and sending the data to a callback function.

Example

  use CsvParser\Simple;


  function handler ( $data ) {
  	print_r( $data );
  }

  /* 
  
  Parameters for parseRowByRow: 
  
   * @param string  $filename  File to parse
	 * @param string  $callback  Callback function to send data to
	 * @param int     $line      Length - Must be greater than the longest line (in characters) to be found in the CSV file (allowing for trailing line-end characters).
	 * @param str     $delimiter Set the field delimiter (one character only).
	 * @param str     $enclosure Set the field enclosure character (one character only)
	 * @param type    $escape    Set the escape character (one character only). Defaults as a backslash.
     * @param bool    $autoDetectHeader Try to auto detect header rows - if false, line 1 i always used
	 * @return bool
 */

  
  Simple::parseRowByRow('file.csv' ,'handler');

History

2014-07-23 Ver 0.1.3 - Quick hack, initial release 2015-08-27 Ver 0.1.4 - Updated README with example code 2018-03-02 Ver 0.2.3 - Attempt to auto detect if first row of file doesn't have the correct header info. 2024-03-05 Ver 0.3.0 - Removed auto_detect_line_endingsas it is deprecated

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固