Tobias Talltorp wrote:
> > No. People use whatever file extensions they like.
>
> So, If I create a 3D-program, I could say that file extensions for
> this program will be .pdf (not a prefered extension, but still)?
> Is it more a question of getting your file extension as widely used
> as possible, so other companies dont bother using them, since most
> computers have them associated with an other program?

Yes. More or less.

> > MIME-types do what you need. But they don't belong to the filename.
>
> What do you mean by this?

Browsers are among the programs which do not identify files, which are 
sent to them, by the filename extension, but by the so called 
MIME-type. This MIME-type is not part of the file or the filename, but 
an exterior description of the file. In this case, the MIME-type is 
sent via the HTTP-headers.
This way, a php-script can be anything, plain-text, HTML or an image, 
by just sending a header like:
header("Content-type: image/gif");
or 
header("Content-type: text/plain");

Default is
header("Content-type: text/html");

If you want a list of all MIME-types or something like that, try asking 
someone who knows, or google.com.

regards
Wagner

-- 
Three may keep a secret, if two of them are dead.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to