Answers for "how to find file type in php upload"

PHP
0

php get file type from url

$file_info = new finfo(FILEINFO_MIME_TYPE);
$mime_type = $file_info->buffer(file_get_contents($image_url));
echo $mime_type;
Posted by: Guest on March-16-2021
9

php get filetype

<?php
echo filetype('/etc/passwd');  // file
echo filetype('/etc/');        // dir
?>
Posted by: Guest on February-03-2021

Code answers related to "how to find file type in php upload"

Browse Popular Code Answers by Language