How to force file download with PHP

后端 未结 11 1535
被撕碎了的回忆
被撕碎了的回忆 2020-11-21 23:13

I want to require a file to be downloaded upon the user visiting a web page with PHP. I think it has something to do with file_get_contents, but am not sure how

11条回答
  •  渐次进展
    2020-11-21 23:21

    
    

    Or, when the file is not openable with the browser, you can just use the Location header:

    
    

提交回复
热议问题