note 13341 added to function.file.php
| From: | halim at NOSPAM dot onemain dot com | Date: | Tue, 12 Jun 2001 16:32:09 +0000 |
| Subject: | note 13341 added to function.file.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14340@lists.php.net to get a copy of this message | ||
Is there any PHP function similar to the unix file command? It would be very useful to me to have a
function that detects file format based on magic numbers... I'd rather have a native PHP
function than just using
$type = system("file $filename");
which is what I will probably end up doing for my code...
http://www.php.net/manual/en/function.file.php