The code below shows how to open a file from the server which cannot be accessed by the web server
$path = "/home/files/documents.doc";
header("Cache-Control: pre-check=0, post-check=0, max-age=0");
header('Content-Type: application/octet-stream');
header("Content-Disposition: attachment; filename=documents.doc);
header("Content-Description: File Transfer");
header("Content-Type:documents.doc);
header("Last-Modified: " . now());
echo readfile($path);


