How to delete a file that is not an image?
<p>I wrote this code to store an image and avoid that someone store a malware or other files different from an image:</p>

<pre><code>$content = file_get_contents($image);
file_put_contents($path, $content);

// Check imagesize to know if it is an image or not:
$sizeimage = getimagesize(dirname(__FILE__)."/".$path);
if($sizeimage[0]&lt;10000){ echo "ok"; }else{ unlink(dirname(__FILE__)."/".$path); }
</code></pre>

<p>I tried to insert another files like a CSS file and it store the CSS in the database.</p>

<p>Why ? What is wrong in my code ?</p>
