i did not use zip file anymore then can work already. i am able to download the file successfully. the next problem arises up. :sad:
In the first place, the mp3 file has a ID3 tag. after it has been downloaded, the ID3 tag is deleted. I figure it must be the codinng though because when i download it straight from server through ftp. Everything is alright. i myself really do not know what is wrong. :?: :?:
This is the part of code which i think might be the problem
$currentdir = '../mp3_files';
$trackname = $trackdb->retrieveTrackName($track_oid);
$filename = "$trackname.mp3";
$pathname = "$currentdir/$filename";
$fr = fopen($pathname, 'r');
$filedata = fread($fr, filesize($pathname));
//fclose($fr);
//$zipfile->add_file($filedata,$filename);
header ( 'Content-Length: ' . filesize ( $pathname ) );
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=$filename");
header ( 'Content-Transfer-Encoding: binary' );
readfile($pathname);