[PEPr] Comment on Tools and Utilities::MIME_ContentType
| From: | PEPr | Date: | Tue, 20 Apr 2004 01:09:50 +0000 |
| Subject: | [PEPr] Comment on Tools and Utilities::MIME_ContentType | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-28097@lists.php.net to get a copy of this message | ||
Pierre-Alain Joye (http://pear.php.net/user/pajoye) has commented on the proposal for Tools and
Utilities::MIME_ContentType.
Comment:
usefull proposal
File_MimeTypes reflects more this class goal.
Autodetect using the 'file' cmd may be optionnal (ie binarycheck true|false) or on failure
(bad extension). Is 'file' available on win32?
Maybe a nice addition (iirc there is a link to a php5 parser there):
http://www.freedesktop.org/Standards/shared-mime-info-spec
About the various extension methods, some faster methods (I let you find the way to drop the
extension ;) ):
$p=strrpos($file, '.');
$ext = $p!==false?substr($file,$p+1):'';
$base = $p!==false?substr($file, 0,$p):$file;
hth
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=54
--
Sent by PEPr, the automatic proposal system at http://pear.php.net