23 lines
616 B
PHP
23 lines
616 B
PHP
<?php
|
|
if ( !isset( $_SESSION ['ready'] ) )
|
|
{
|
|
session_start ();
|
|
$_SESSION ['ready'] = TRUE;
|
|
}
|
|
if (!empty($_GET['fl']))
|
|
$file_location = $_GET['fl'];
|
|
else
|
|
$file_location = '';
|
|
if (!empty($_GET['f']))
|
|
$file =$_GET['f'];
|
|
else
|
|
$file = '';
|
|
header("Content-type: application/force-download");
|
|
header("Content-type: application/octet-stream");
|
|
header("Content-type: application/download");
|
|
header("Content-Transfer-Encoding: Binary");
|
|
header("Content-length: ".filesize($file_location));
|
|
header("Content-disposition: attachment; filename=".$file);
|
|
readfile($file_location);
|
|
?>
|