Download the PHP package parsecsv/php-parsecsv without Composer

On this page you can find all versions of the php package parsecsv/php-parsecsv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-parsecsv

ParseCsv

PHPUnit

ParseCsv is an easy-to-use PHP class that reads and writes CSV data properly. It fully conforms to the specifications outlined on the Wikipedia article (and thus RFC 4180). It has many advanced features which help make your life easier when dealing with CSV data.

You may not need a library at all: before using ParseCsv, please make sure if PHP's own str_getcsv(), fgetcsv() or fputcsv() meets your needs.

This library was originally created in early 2007 by jimeh due to the lack of built-in and third-party support for handling CSV data in PHP.

Features

Installation

Installation is easy using Composer. Just run the following on the command line:

If you don't use a framework such as Drupal, Laravel, Symfony, Yii etc., you may have to manually include Composer's autoloader file in your PHP script:

Without composer

Not recommended, but technically possible: you can also clone the repository or extract the ZIP. To use ParseCSV, you then have to add a require 'parsecsv.lib.php'; line.

Example Usage

Parse a tab-delimited CSV file with encoding conversion

Auto-detect field delimiter character

Parse data with offset

Limit the number of returned data rows

Get total number of data rows without parsing whole data

Get most common data type for each column

Modify data in a CSV file

Change data values:

Enclose each data value by quotes:

Replace field names or set ones if missing

Add row/entry to end of CSV file

Only recommended when you know the exact structure of the file.

Convert 2D array to CSV data and send headers to browser to treat output as a file and download it

Your web app users would call this an export.

For more complex examples, see the tests and examples directories.

Test coverage

All tests are located in the tests directory. To execute tests, run the following commands:

`

Note that PHP 8.2 and newer allow PHPUnit versions that deprecate @annotations. The GitHub actions use Rector to convert them to #[attributes]. When pushing code to GitHub, tests will be executed using GitHub Actions. The relevant configuration is in the file .github/workflows/ci.yml. To run the test action locally, you can execute the following command:

`

Security

If you discover any security related issues, please email [email protected] instead of using GitHub issues.

Credits

Contributors

Code Contributors

This project exists thanks to all the people who contribute.

Please find a complete list on the project's contributors page.

License

(The MIT license)

Copyright (c) 2014 Jim Myhrberg.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Build Status


All versions of php-parsecsv with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package parsecsv/php-parsecsv contains the following files

Loading the files please wait ....