use readfile()
for example:
you have the following link on a page, where your user can click to download
<a href="getfile.php?name=foofile">
in getfile.php you read the file and send it to the browser (all done by reafile() ).
but make sure that you first sent a header to tell the browser what kind of file you're sending
<?
// change this accordingly
Header("Content-type: text/html"); // html will come
// Header("Content-type: image/gif"); // gif
// Header("Content-type: text/plain"); // text
// etc.
readfile("hidden/directory/".$name);
// thats it
?>
may do some checks before you readfile(), file exists,
no path informations in $name (what if someone calls your script with:
name=../../usr/pwd)
hope that helps