Как я понимаю, это зависит от настроек веб-сервера, который говорит, что делать с файлом - открывать его или сохранять. Ты можешь настроить так, чтобы html у тебя скачивались, а zip открывались в окне браузера.
У тебя два пути:
1) Добавить в файл .htaccess следующие строки:
Code:<FilesMatch "\.(?i:pdf)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
2) Или если у тебя все-такие появится php, создать файл download.php следующего вида:
Code:<?php if (isset($_GET['file'])) {
$file = $_GET['file'];
if (file_exists($file) && is_readable($file) && preg_match('/\.pdf$/',$file)) {
header('Content-type: application/pdf');
header("Content-Disposition: attachment; filename=\"$file\"");
readfile($file);
}
} else {
header("HTTP/1.0 404 Not Found");
echo "<h1>Error 404: File Not Found: <br /><em>$file</em></h1>";
}
?>
И ссылки на файлы делать вида:
Code:<a href="http://www.tvoysite.ru/download.php?file=example.pdf">Click here to download PDF</a>