You are here: Re: "open or save " a jpg file « HTML « IT news, forums, messages
Re: "open or save " a jpg file

Posted by viza on 08/02/07 10:40

Hi

Giorgio wrote:
> I'd like to make the same thing as in flickr.com: a link that, if
> clicked, doesn't open the jpg file, but asks if open or save it.

You need to get your server to send a

Content-Disposition: attachment

header. The way this is done depends on your server. If you are using
apache 2, you need to add eg:

<Files *.jpg>

header set Content-Disposition attachment

</Files>

to the appropriate .htaccess file.

If you have not got permission to write to .htaccess, then you can still
botch it using php.

http://php.net/manual/en/function.header.php
http://php.net/manual/en/function.readfile.php

 

Navigation:

[Reply to this 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

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