Re: Content Type
| From: | Nick Talbott | Date: | Mon, 23 Oct 2000 07:57:58 +0000 |
| Subject: | Re: Content Type | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-21734@lists.php.net to get a copy of this message | ||
One route is to examine the filetype. Apache comes with a file called
mime.types (in the conf directory) that maps mime types to filetypes. I
have used this as a basis for building a database table that allows you to
look up mime type by filetype. Have a look at the code in the file mime.php
in the Owl package (owl.sourceforge.net) for some code that does this. In
the same package, the download.php file gives some code you could look at
for using the the mime type when returning a file.
Regards
Nick Talbott
IT Policy and Strategy Manager, Powys County Council, UK
email nickt@powys.gov.uk
FAX +44 (0) 1597 824781
web http://www.powys.gov.uk and http://www.powysweb.co.uk
-----Original Message-----
From: Scott Poarch <scott@globalhost.com>
To: php <php-general@lists.php.net>
Date: 22 October 2000 17:29
Subject: [PHP] Content Type
>Hello all,
>
>Can anyone tell me how to get the content type of a file? I'm working on a
>webmail system, and I want to get the content type so I can set up the mime
>attachments.
>
>Any help would be greatly appreciated.
>- - - - - - - - - - - - - -
>Scott Poarch
>GlobalHost.com
>- - - - - - - - - - - - - -
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>