PHP automatically downloads file without prompting to save or open file

后端 未结 2 728
情书的邮戳
情书的邮戳 2021-01-24 16:53

I have a function which I use to enable downloading of files from a non-public directory. The downloading part works fine except that it does not prompt the user before and allo

相关标签:
2条回答
  • 2021-01-24 17:34

    i am not sure if this is really a php thing, i believe it´s more based on the browser settings. in general your code looks okay for me, when i compare it with other examples.

    0 讨论(0)
  • 2021-01-24 17:36

    To stop Automatic downloads in chrome goto content setting which is chrome://settings/content

    enter image description here

    Then scroll to the bottom and your see the Automatic Downloads bit, then select your preference.

    P.S Not really a question suited for Stackoverflow.

    0 讨论(0)
提交回复
热议问题