note 118313 added to function.finfo-buffer

From: Date: Sat, 14 Nov 2015 18:31:23 +0000
Subject: note 118313 added to function.finfo-buffer
Groups: php.notes 
Request: Send a blank email to php-notes+get-204150@lists.php.net to get a copy of this message
You should never rely on finfo::buffer to get the MimeType of a file, you must always save the file physically or temporariliy and use finfo_open to get MimeType. I tested it with an excell file, with buffer it says octet-stream that is not valid, with finfo_open it says ms-excell as correct. ---- Server IP: 94.198.100.12 Probable Submitter: 151.19.204.131 ---- Manual Page -- http://php.net/manual/en/function.finfo-buffer.php Edit -- https://master.php.net/note/edit/118313 Del: integrated -- https://master.php.net/note/delete/118313/integrated Del: useless -- https://master.php.net/note/delete/118313/useless Del: bad code -- https://master.php.net/note/delete/118313/bad+code Del: spam -- https://master.php.net/note/delete/118313/spam Del: non-english -- https://master.php.net/note/delete/118313/non-english Del: in docs -- https://master.php.net/note/delete/118313/in+docs Del: other reasons-- https://master.php.net/note/delete/118313 Reject -- https://master.php.net/note/reject/118313 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204150) next »