1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php $formid = "Drawing"; require_once "inc/configure.php";
if(havePermission("GNr")==false){ myerror("Invalid Permission"); }
$refid = (int)$_REQUEST['refid'];
$path = "resources/"; $file = "ring_PDF.pdf"; $uri = $path . "" . $file;
/* header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . urlencode($file)); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); header("Content-Length: " . filesize($uri)); flush(); // this doesn't really matter. */ /*$fp = fopen($uri, "r"); while (!feof($fp)) { echo fread($fp, 65536); flush(); // this is essential for large downloads } fclose($fp);*/ header("Content-Disposition: attachment; filename=" . urlencode(getOrgFilename($file))); header("Content-Length: " . filesize($uri)); header('Content-type: application/pdf'); readfile($uri);
?>
|