Kód: Vybrať všetko
<?php
$file = "./" . UPLOAD_ZLOSKA . "/" . $_SESSION['subor'];
$id_suboru = $_SESSION['id_suboru'];
$pocet_stiahnuti = $_SESSION['pocet_stiahnuti'] + 1;
header("Cache-control: private");
header("Content-Type: application/force-download");
header("Content-Length: ".filesize($file));
header("Content-Disposition: filename=" . $_SESSION['povodny_nazov']);
flush();
$fd = fopen($file, "r");
while(!feof($fd)) {
echo fread($fd, filesize($file));
flush();
}
fclose ($fd);
?>
Kód: Vybrať všetko
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sk" lang="sk">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250" /> ... . .. .....
.
.
.
.