hi all,
I have created a simple downloading script for a file which is given below[php]$f="images/52219-4.bmp";
$ftype = mime_content_ty pe($f);
$fsize= filesize($f);
header("Content-type: \"".$ftype."\"" );
header("Content-Disposition: attachment; filename=\"".$f ."\"");
header("Content-length:".$fsize );
readfile($f);
exit;[/php] Even this script downloads the image, the downloaded file size is 0 bytes.
What is wrong in this script or i have to add any more headers?
Plz anybody help me....
I am looking forward for your valuable suggestions and solutions.....
Advance thanks,
I have created a simple downloading script for a file which is given below[php]$f="images/52219-4.bmp";
$ftype = mime_content_ty pe($f);
$fsize= filesize($f);
header("Content-type: \"".$ftype."\"" );
header("Content-Disposition: attachment; filename=\"".$f ."\"");
header("Content-length:".$fsize );
readfile($f);
exit;[/php] Even this script downloads the image, the downloaded file size is 0 bytes.
What is wrong in this script or i have to add any more headers?
Plz anybody help me....
I am looking forward for your valuable suggestions and solutions.....
Advance thanks,
Comment