Download a MIDI-file to a mobile phone
Posted: Tue Jun 28, 2005 1:25 pm
I have problem to download a MIDI-file (.mid) to a mobile phone.
I have a page called "download.php":
It works to download the MIDI-file, but the file is saved to the phone as "download.mid", instead of its right name.
On a web browser, the MIDI-file opens and plays with the right name.
Is there any way to solve this?
I have a page called "download.php":
Code: Select all
<?php
$filename = $_GETї'file'];
$directory = "e;midi/"e;;
$path = "e;$directory$filename"e;;
if (file_exists($path) ) {
header("e;Content-type: audio/midi"e;);
readfile("e;$path"e;);
}
?>On a web browser, the MIDI-file opens and plays with the right name.
Is there any way to solve this?