I' ve a file in a directory(/tmp) out from http root of web server.
I need to open a page that send this file when it is opened (es.:
opening page.php under netscape it opens a request to save file to
disk, but the file is out of www root), i think i t is possible using
command header and a raw
, June 21, 2001 6:03 PM
Subject: [PHP-DB] raw file header in http
I' ve a file in a directory(/tmp) out from http root of web server.
I need to open a page that send this file when it is opened (es.:
opening page.php under netscape it opens a request to save file to
disk, but the file is out
Try the following:
create a link to a script download.php which will read the file (from
anywhere on the disk) and send it to the user like this:
header(Content-Type: application/force-download);
header(Content-Length: .filesize($filename));
header(Content-Disposition: attachment;