I have check extension of uploaded file in php if jpg|png|gif
than upload otherwise not allow to upload
$allowed = array('gif','png' ,'jpg');
$filename = $_FILES['video_file']['name'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if(!in_array($ext,$allowed) ) {
echo 'error';
}
but what happen when i change .php
or .mp3
file to jpg|png|gif
and upload
so how i can stop this type of file upload in php