PHP generating csv not sending correct new line feeds

后端 未结 3 1132
醉梦人生
醉梦人生 2021-02-08 00:51

I have a script that generates a csv file using the following code:

header(\'Content-type: text/csv\');
header(\'Content-Disposition: attachment; filename=\"\'.d         


        
3条回答
  •  说谎
    说谎 (楼主)
    2021-02-08 00:55

    I experienced the same issue. Later I replaced
    single quotes ' with double quotes " building $content variable.

    i.e. Keeping outer quotes rather double than single in $content variable.

    And it worked :)

提交回复
热议问题