technicalkumargaurav/file-reader 问题修复 & 功能扩展

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

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

technicalkumargaurav/file-reader

Composer 安装命令:

composer require technicalkumargaurav/file-reader

包简介

A PHP application to read and process Excel, CSV, PDF files.

README 文档

README

A lightweight PHP library for reading PDF, Excel, and CSV files through a single unified API.

Features

  • Read CSV files
  • Read Excel files (.xls, .xlsx)
  • Read PDF files
  • Unified response format
  • Framework independent
  • PSR-4 autoloading
  • Compatible with Core PHP, Laravel, and CodeIgniter

Requirements

  • PHP 8.1+
  • Composer

Installation

composer require technicalkumargaurav/file-reader

Usage

require 'vendor/autoload.php';

use Kumar\FileReader\Reader;

$reader = new Reader();

$result = $reader->read('sample.csv');

print_r($result);

CSV Example

$result = $reader->read('sample.csv');

Response:

[
    'success' => true,
    'type' => 'csv',
    'filename' => 'sample.csv',
    'meta' => [
        'rows' => 3,
        'columns' => 3
    ],
    'data' => [...]
]

Excel Example

$result = $reader->read('sample.xlsx');

Response:

[
    'success' => true,
    'type' => 'excel',
    'filename' => 'sample.xlsx',
    'meta' => [
        'rows' => 100,
        'columns' => 8,
        'sheet' => 'Sheet1'
    ],
    'data' => [...]
]

PDF Example

$result = $reader->read('sample.pdf');

Response:

[
    'success' => true,
    'type' => 'pdf',
    'filename' => 'sample.pdf',
    'meta' => [
        'characters' => 6225
    ],
    'data' => [
        'content' => 'PDF content...'
    ]
]

Supported File Types

Extension Supported
csv Yes
xls Yes
xlsx Yes
pdf Yes

Project Structure

src/
├── Drivers/
│   ├── CsvReader.php
│   ├── ExcelReader.php
│   └── PdfReader.php
│
├── Exceptions/
│   └── UnsupportedFileException.php
│
├── Helpers/
│   └── ResponseFormatter.php
│
└── Reader.php

Roadmap

v1.0.0

  • CSV Reader
  • Excel Reader
  • PDF Reader
  • Unified Response Format

v1.1.0

  • File Metadata
  • JSON Export
  • File Validation

v2.0.0

  • Laravel Integration
  • CodeIgniter Integration
  • DOCX Support
  • Streaming Support

License

MIT License

Author

Kumar Gaurav

GitHub: https://github.com/technicalKumarGaurav

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2026-06-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固