I know gmail does this, but, they do many things. Does anyone else know how?
I know gmail does this, but, they do many things. Does anyone else know how?
You can send a weird content-type that the browser doesn't recognise (e.g. application/x-octet-stream), but it's not guaranteed -- IE for one likes to guess at the content of files you send it. One of the best ways is to zip it up. That way the user deals with the zip file instead of the actual file. In my browser that means opening the zip file in the current tab (it doubles as a file manager) but most browsers don't have Konq's plugin system.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
How do you tell it what content type it is? Like with a link or Javascript or something.
<?php header('Content-type: application/x-octet-stream'); ?>
Or any mime-type you'd like.
Headers must be output before any text or other data is sent.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
With the HTTP Content-Type header.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
So you put that php line at the very top of whatever file?
Indeed.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks