<?
session_start();
//ako prom sesije nije setovana saljemo usera da se autentifikuje
if(!isset($_SESSION["id"]))
{
header("Location: login.php");
}
else
{
$fileDir="C:/Apache/htdocs/Biblija/assets";
$fileName="test.zip";
$completeFilePath=$fileDir.'/'.$fileName;
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header("Content-type: application/zip\nContent-Disposition: inline; filename=\"".$fileName."\"\nContent-length: ".(string)(filesize($completeFilePath)));
$fd=fopen($completeFilePath,'rb');
fpassthru($fd);
}
?>
Ovaj kod sam upravo testirao na mojoj Win makini (Win 2k, Apache/1.3.26 (Win32) PHP/4.2.2) i on radi sasvim ok u IE5 i Operi 6.0. Zip fajl sa kojim sam testirao je velicine 100 bytova!
Probaj da li ce ovo raditi kod tebe.
D