Downloadable Mp3 Files from php headers not working

YuSePe

New Member
hello there okay so this is the deali have my mp3 files on my server and each one is in its own folder.in that folder is the mp3 and a php file with the following script:\[code\]<?php// We'll be outputting a PDFheader('Content-type: audio/mp3');// It will be called file.mp3header('Content-Disposition: attachment; filename="mysong.mp3"');// The PDF source is in original.mp3readfile("mysong.mp3");?>\[/code\]the problem is that when i click to go that php page the headers are suppose to make it so that it automatically downloads the mp3 file yet when it downloads it downloads a 300KB file but when i go to the actual link for the mp3 file it plays it perfectly in the browser so im guessing something is wrong with the php file giving the headers.
 
Back
Top