|
11/23 |
2006/5/30-6/3 [Computer/SW/Languages/Web] UID:43233 Activity:nil |
5/30 Looking for a UNIX equivalent of "file <file>" in PHP. I'd like PHP to determine what type of file it is looking at without having to call system or exec("file $file"...). Please help... \_ Try the Fileinfo PECL extension: http://pecl.php.net/package/Fileinfo |
pecl.php.net/package/Fileinfo details License PHP Description This extension allows retrieval of information regarding vast majority of file. This information may include dimensions, quality, length etc... Additionally it can also be used to retrieve the mime type for a particular file and for text files proper language encoding. |