Added website content and CI config files
This commit is contained in:
20
public/pdf_server.php
Normal file
20
public/pdf_server.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
header("Content-Type: application/octet-stream");
|
||||
|
||||
$file = $_GET["file"] .".pdf";
|
||||
header("Content-Disposition: attachment; filename=" . urlencode($file));
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
header("Content-Description: File Transfer");
|
||||
header("Content-Length: " . filesize($file));
|
||||
flush(); // this doesn't really matter.
|
||||
$fp = fopen($file, "r");
|
||||
while (!feof($fp))
|
||||
{
|
||||
echo fread($fp, 65536);
|
||||
flush(); // this is essential for large downloads
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user