Initial import
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/* @var $this \yii\web\View */
|
||||
/* @var string $file_name */
|
||||
//echo $file_name;
|
||||
//exit;
|
||||
$file = $_SERVER['DOCUMENT_ROOT'].'/_docs/'.$file_name;
|
||||
if(file_exists($file)) {
|
||||
header('Content-type: application/pdf');
|
||||
header('Content-Disposition: inline; filename="' . $file_name . '"');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Accept-Ranges: bytes');
|
||||
@readfile($file);
|
||||
exit;
|
||||
}
|
||||
die('File does not exist');
|
||||
Reference in New Issue
Block a user