Просмотр полной версии : Загрузить SWF без "сохранить объект как"
AleXNoD GD
25.03.2008, 02:54
Видел такую фичу на umora.ru.
Как заставить браузер КАЧАТЬ файл, а не проигрывать??
Полагаю, это связано с указанием типа данных в заголовке, например Header() в php. Кто-нибудь сталкивался?
dmitriev
25.03.2008, 09:47
Мне кажется стоит копать в направлении htaccess
php:
Example#1 Download dialog
If you want the user to be prompted to save the data you are sending, such as a generated PDF file, you can use the » Content-Disposition header to supply a recommended filename and force the browser to display the save dialog.
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
?>
http://ru2.php.net/manual/ru/function.header.php
AleXNoD GD
25.03.2008, 17:48
О, самое оно! Спасибо!
FileReference download немодно уже?
__etc, ну ведь для этого флеш знать надо ;)
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.