954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Disposition of a file that is not in apache's root folder

Ok.. i have a script that lets the authorized user to browse and download the files they want(that's what it supposed to be), but...
i can't get to give the user files via links. The files are in a different drive and folder then apache, so how can i make a link that makes the files downloadable.

this is what i'm sending with headers when you press the link:

header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$_GET['dir']."\".$_GET['file']."");
header("Pragma: no-cache");
header("Expires: 0");
IntoDEV
Newbie Poster
1 post since Aug 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You