How to check file type
<p>I'll check on server side (PHP) if a file is a real .<code>txt</code> or not. At the moment I've wrote :</p>

<pre><code>if(substr($_FILES['tracklistFile']['name'], -3)=='txt')
</code></pre>

<p>but I think that its not the best solution! How can I check it?</p>
