> I'm using Linux Redhat 8.0 (LAMP).
I have a file tx.zip , that is placed in /tmp.
Now I want people to be able to download this file without copying it to
the website tree
Can I make a reference like http://www.website.com/../../../tmp/tx.zip
if the root of my website is /var/www/html/Vwebsite ?
Due to restrictions, I cannot copy the file to /var/www/html/Vwebsite
Any solutions?
You need two things:
1 - What To Do:
http://www.faqs.org/rfcs/rfc1806.html &
http://www.faqs.org/rfcs/rfc2616
2 - How To Do It:
http://us2.php.net/manual/en/function.header.php
Essentially, your header will look something like the following:
header("Content-disposition: attachment; filename=/tmp/tx.zip");
header('Expires: Mon, 26 Nov 1962 00:00:00 GMT');
header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
header('Pragma: no-cache');
or for IE :
header("Content-disposition: attachment; filename=/tmp/tx.zip");
header('Expires: Mon, 26 Nov 1962 00:00:00 GMT');
header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
____________________________________
Wil Moore III, MCP | Integrations Specialist | Assistant Webmaster