it works but this code should be in the top of the page
<?php
$file='a.doc';/// for example
$ext='doc';/// for example
header("Content-type: application/$ext");
header("Content-Disposition: attachment; filename=$file");
readfile($file);
exit;
?>
there shouldn't be any blank line before the code
Asanga Amarawansa
[email protected]
http://www.needmatch.biz