$_FILES["file"]["type"] VS pathinfo($file_name, PATHINFO_EXTENSION) how best and what different
<p><code>$_FILES["file"]["type"]</code> VS <code>pathinfo($file_name, PATHINFO_EXTENSION)</code> how best and what different</p>

<p>i ask this question because i found <code>$_FILES["file"]["type"]</code> not good with images its cant define image type which i it take by my D-camera however that <code>pathinfo($file_name, PATHINFO_EXTENSION)</code> it can so easy define any type of file but i see all developer use <code>$_FILES["file"]["type"]</code> so please tell me when i should use them and what is good for security </p>
