diff --git a/str_putcsv.php b/str_putcsv.php index eccd88e..7a84b5e 100644 --- a/str_putcsv.php +++ b/str_putcsv.php @@ -23,7 +23,7 @@ function str_putcsv(array $fields, string $delimiter = ',', string $enclosure = '"', string $escape = '\\'): string { // Open an in-memory file resource - $fp = \Safe\fopen('php://temp', 'r+b'); + $fp = \Safe\fopen('php://memory', 'r+b'); try { // Write the fields array to the file resource as a CSV line