Tipo de arquivo Validate PHP
// get extension of file name:
pathinfo($filename, PATHINFO_EXTENSION);
// validate for array of allowed file types:
$allowed = array('gif', 'png', 'jpg');
$filename = $_FILES['video_file']['name'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed)) {
echo 'error';
}
Literate Lentil