Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

Pesquisar no apoio

Evite burlas no apoio. Nunca iremos solicitar que telefone ou envie uma mensagem de texto para um número de telefone ou que partilhe informações pessoais. Por favor, reporte atividades suspeitas utilizando a opção "Reportar abuso".

Saber mais

gif fail after download using php

  • 3 respostas
  • 3 têm este problema
  • 12 visualizações
  • Última resposta por 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.

Todas as respostas (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.