PHP generate file for download then redirect

前端 未结 11 2942
春和景丽
春和景丽 2020-11-22 09:08

I have a PHP app that creates a CSV file which is forced to download using headers. Here\'s the relevant part of the code:

header(\'Content-Type: applicatio         


        
11条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 09:12

    You can try and redirect to the URL plus a parameter that represents the file contents. And in the redirect, you can output the file content for download.

提交回复
热议问题