Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

about downloading mp3 file

  • 4 trả lời
  • 1 gặp vấn đề này
  • 9 lượt xem
  • Trả lời mới nhất được viết bởi 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)

Tất cả các câu trả lời (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');