correct header to download an mp4 file

前端 未结 1 1289
南方客
南方客 2021-01-15 15:27

Here i am testing with header functions which will allow me to download a mp4 file from browser.I have a file which is 94 megabyte in size.But when i click the download butt

相关标签:
1条回答
  • 2021-01-15 16:21

    Try

    header("Content-Type: video/mp4");
    header("Content-Length: ".filesize("path/to/mp4"));
    readfile("path/to/mp4");
    
    0 讨论(0)
提交回复
热议问题