NYCPHP Meetup

NYPHP.org

[nycphp-talk] Anyway to force a download of GIF file?

Fee, Patrick J patrick.fee at baesystems.com
Thu Jul 17 12:10:59 EDT 2003


Chris,

This is slightly off-topic, but do you have any idea how to do that in Cold
Fusion?

Patrick J. Fee
Web & Database Group Manager
BAE SYSTEMS
600 Maryland Ave. SW  Suite 600
Washington D.C. 20024
Patrick.Fee at BAESYSTEMS.com
Tel: (202) 548-3759
Fax: (202) 608-5970



-----Original Message-----
From: Chris Shiflett [mailto:shiflett at php.net]
Sent: Thursday, July 17, 2003 10:55 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Anyway to force a download of GIF file?


--- "DeWitt, Michael" <mjdewitt at alexcommgrp.com> wrote:
> I have been looking around for a way to get browsers to download
> rather than display a GIF file.

Have you looked into the Content-Disposition header? With it you can specify
a
filename (convenient when the name of your PHP script isn't the name you
want
the browser to use), and you can indicate inline or attachment. You would
want
attachment.

Double-check my syntax, but I think it would go something like this:

header('Content-Disposition: attachment; filename=blah.gif');

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk



More information about the talk mailing list