Skip to content

the output method can not be used for saving CSV document to the underlying filesystem #434

Description

@mitmelon

When using

$csv = Writer::createFromString();
$csv->insertOne($records);
$csv->output(DIR.'/../users.csv');

Error popups below... Why cant it support path?

Fri Aug 13 15:59:01.224064 2021] [php:error] [pid 4580:tid 1716] [client 127.0.0.1:52529] PHP Fatal error: Uncaught League\Csv\InvalidArgument: The filename C:\\xampp\\htdocs\\project\\src\\Register/../users.csv cannot contain the "/" and "\" characters. in vendor\league\csv\src\InvalidArgument.php:40\nStack trace:\n#0 vendor\league\csv\src\AbstractCsv.php(392): League\Csv\InvalidArgument::dueToInvalidHeaderFilename('C:\\xampp\\htdocs...')\n#1 vendor\league\csv\src\AbstractCsv.php(367): League\Csv\AbstractCsv->sendHeaders('C:\\xampp\\htdocs...')\n#2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions