php實現文件下載

php需要修改一個http響應頭(http協議) header("Content-type: application/octet-stream"):服務器給瀏覽器的內容是二進制流式文件, header("Content-Disposition: attachment; filename=filename"):告訴瀏覽器當前數據不需要解析,是附件,本地保存的時候建議使用的文件名字是filename
相關文章
相關標籤/搜索