Цей вебсайт матиме обмежену функціональність, доки ми проводимо його обслуговування для поліпшення роботи. Якщо прочитана стаття не розв'язала вашу проблему і ви хочете поставити питання, наша спільнота підтримки з радістю допоможе вам на @FirefoxSupport у Twitter та /r/firefox на Reddit.

Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

gif fail after download using php

  • 3 відповіді
  • 3 мають цю проблему
  • 12 переглядів
  • Остання відповідь від R.S.R

more options

I create a web page in php. after download a file using php:

header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="sth.txt"'); readfile("sth.txt");

the gif animation dosn't work. in IE9 every thing is ok. please help me.

I create a web page in php. after download a file using php: header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="sth.txt"'); readfile("sth.txt"); the gif animation dosn't work. in IE9 every thing is ok. please help me.

Усі відповіді (3)

more options

I do not know if I understand this question correctly, so maybe this does not help. But I think you may have a problem with your MIME-types. Firefox does not trust application/octet-stream (security policy). I think you should really use the normal web-standard Mimetypes for your gifs, webpages or textfiles.

https://developer.mozilla.org/en/properly_configuring_server_mime_types

more options

Can you post a link to that web page?

more options

Thanks for your reply. My web page is offline, in my pc using EasyPHP. I tried other mime types like text/plain too. Let me explain my question more: There is sth similar to Yahoo Mail. My page has a link, like Files(2), it means two new files is available for download. After user clicks it, he see the links to download the files. before download there must be a MySQL query to decrease the number of new files (1), then download the file. I implement this using AJAX. first time every thing is ok, but for second time, after user clicks the link to download, the AJAX gif is not working (image loads without animation). Also for testing, I placed a gif in my page to show all the time (not for AJAX). after the first download, the animaion is stop and show a still image. By the way, my page do net refreash after click and download.

Of course, i solved my problem by using window.open() instead of window.location.href for redirect to download page.

Thanks for help.