<?
$file = "nombrearchivo o variable";
$path="./carpeta/";
$url = $path."/".$file;
header ("Content-Disposition: attachment; filename=".$file." ");
header ("Content-Type: application/octet-stream");
header ("Content-Length: ".filesize($url));
readfile($url);
?>
Un Saludo