Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

about downloading mp3 file

  • 4 Antworten
  • 1 hat dieses Problem
  • 9 Aufrufe
  • Letzte Antwort von rambo12

more options

i have a php site. i am able to download mp3 files on localhost. after uploading on hosting server, i am able to download on IE, chrome. but mozilla gives a garbage file. instead of music file. I disabled vlc plugin or windows plugin and checked, still not working. Please help. In code i have given header('Content-Type: application/force-download)

i have a php site. i am able to download mp3 files on localhost. after uploading on hosting server, i am able to download on IE, chrome. but mozilla gives a garbage file. instead of music file. I disabled vlc plugin or windows plugin and checked, still not working. Please help. In code i have given header('Content-Type: application/force-download)

Alle Antworten (4)

more options

If Firefox tries to open the MP3 file in a tab then that suggests that the server is sending the file as text/plain and not as a content type that force a download action.

See:

more options

First, I used header('Content-Type: application/octet-stream') to download the file. this did not work in any browser. Then i used header('Content-Type: application/force-download) . this worked in IE, CHROME but not in Mozilla FF 12 version I dont know what content type requires mozilla. why there is so much problem with mozilla. please give solution to download audio mp3 files.

more options

I am using the below code it is working in IE,CHROME. with mozilla when i click on save it is giving binary file and unable to play the file. When click on open option it is downloading in VLC and goes to temp folder. what should I do so that frm mozilla it saves the file in VLC format not in binary format.


$fname=$_GET['f'];

   $file= "music1/".$fname;

header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false);

   //header('Content-Type: application/force-download');

//header('Content-Type: application/binary'); header('Content-Type: audio/mpeg');

  	//header('Content-Type: audio/x-mp3');

header("Content-Disposition: attachment; filename=$file");

   header("Content-Length: " . filesize("$file"));
   header("Content-Description: Download");

header("Content-Transfer-Encoding: binary");

// refer to file and exit readfile("$file"); exit();

?>

more options

write now i am only using header('Content-Type: audio/mpeg');