|
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
Navigation:
[Reply to this message]
|