Posted by Alvaro G. Vicario on 12/11/05 00:50
*** GS escribió/wrote (8 Dec 2005 09:03:00 -0800):
> Im new to PHP. I am looking for a link or help on how to set the
> mime type in my php script as well as send binary data to the browser
> window instead of having it ask me to save the file.
Setting MIME type is easy:
header('Content-Type: foo/bar');
You can also tell the browser to display data inline:
header('Content-Disposition: inline; filename="foo"');
That's the server-side work. Now you need that the browser follows the
directions provided by the server, and that's going to be your main
difficulty. Internet Explorer is well known for ignoring these directions
so you'll need a lot of tweaking. Firefox though tends to obey them.
--
-+ Álvaro G. Vicario - Burgos, Spain
++ http://bits.demogracia.com es mi sitio para programadores web
+- http://www.demogracia.com es mi web de humor libre de cloro
--
[Back to original message]
|