fputcsv and newline codes

前端 未结 8 2255
别那么骄傲
别那么骄傲 2020-11-28 10:12

I\'m using fputcsv in PHP to output a comma-delimited file of a database query. When opening the file in gedit in Ubuntu, it looks correct - each record has a line break (no

8条回答
  •  独厮守ぢ
    2020-11-28 11:11

    I've been dealing with a similiar situation. Here's a solution I've found that outputs CSV files with windows friendly line-endings.

    http://www.php.net/manual/en/function.fputcsv.php#90883

    I wasn't able to use the since I'm trying to stream a file to the client and can't use the fseeks.

提交回复
热议问题