Reply to Re: Link, which always offers to save/open....

Your name:

Reply:


Posted by jodleren on 03/13/07 17:15

On Mar 13, 5:18 pm, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> jodleren wrote:
> > I need a link to some files, which should not be opened by the browser
> > or plugins.
>
> Google: HTTP Content-Disposition header

You could be a little more specific...

I found something and came up with:

<?php
$file=$_GET['file'];
header('Content-type: application/force-download');
header("Content-Disposition: attachment; filename=\"$file\"");
readfile($file);
?>

Though, this opens a window (when I use this from another link), is
there a way to avoid the browser window?

BR
Sonnich

Please CC to sonnich_at_hot_._ee

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация