Answers for "check what kind of file was uploaded php"

PHP
0

check what kind of file was uploaded php

$allowed = array('gif', 'png', 'jpg');
$filename = $_FILES['video_file']['name'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed)) {
    echo 'error';
}
Posted by: Guest on September-06-2021

Code answers related to "check what kind of file was uploaded php"

Browse Popular Code Answers by Language