Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 echo file_gets_content 根据 $_POSTed 变量输出原始图像数据 jpeg。我得到了预期的结果(显示图像)但是,当我“右键单击另存为”时,Firefox 尝试下载该文件,但结果证明该文件已损坏
这在 Google Chrome 中不会发生,为什么会发生这种情况,我该如何解决这个问题?
事实证明我是对的...当您在 Firefox 中“右键单击/另存为”时,他的浏览器会尝试通过复制过程来下载媒体...问题似乎是它没有发布重现图像所需的变量. 在我的逻辑中使用会话解决了这个问题