Re: List of all file extensions

From: Date: Wed, 07 Feb 2001 22:49:11 +0000
Subject: Re: List of all file extensions
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-38639@lists.php.net to get a copy of this message
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.

« previous php.general (#38639) next »