Reply to Re: Image MIME/file type

Your name:

Reply:


Posted by PleegWat on 11/07/06 14:48

In article <u%%3h.14794$163.13570@newsfe6-gui.ntli.net>, Vertuas says...
> Hi All,
>
> Is there a way to get PHP to change the mime type for a file sent to a
> browser.
>
> I need my website viewers to be able to click a link to directly download
> and save an image, rather than the browser displaying it.
>
> Is there some other way to make this happen?

You need to send content-type and content-disposition headers, example:

header('Content-type: image/png');
header('Content-disposition: attachment; filename="'$filename'"');


--
PleegWat
Remove caps to reply

[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

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