note 86802 added to ref.fileinfo
| From: | jeff at newtnotes dot com | Date: | Tue, 04 Nov 2008 15:39:32 +0000 |
| Subject: | note 86802 added to ref.fileinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146121@lists.php.net to get a copy of this message | ||
To those who suggest using the Unix/Linux "file" command, please understand that this is
NOT a portable solution. "file" unfortunately has several variants, and if you are going
to do something CRAZY like run your PHP app server on Solaris, this won't work.
As a general rule, it is never a good idea to rely on system file execution.
* Not portable
* Can open a security hole
* Slow
etc.
However, after reading these comments, it looks like there is no good, universal, non-deprecated
solution for this problem. WTF? It does seem like something that should come bundled with PHP as a
core component, including a Mime types/magic file equivalent that is not system dependent.
----
Server IP: 208.69.120.35
Probable Submitter: 66.93.55.3
----
Manual Page -- http://www.php.net/manual/en/ref.fileinfo.php
Edit -- https://master.php.net/note/edit/86802
Del: integrated -- https://master.php.net/note/delete/86802/integrated
Del: useless -- https://master.php.net/note/delete/86802/useless
Del: bad code -- https://master.php.net/note/delete/86802/bad+code
Del: spam -- https://master.php.net/note/delete/86802/spam
Del: non-english -- https://master.php.net/note/delete/86802/non-english
Del: in docs -- https://master.php.net/note/delete/86802/in+docs
Del: other reasons-- https://master.php.net/note/delete/86802
Reject -- https://master.php.net/note/reject/86802
Search -- https://master.php.net/manage/user-notes.php