php extension fileinfo how to enable

I'm not sure how they coding.
$ /usr/local/php56/bin/php -m | grep fileinfo
fileinfo

$ /usr/local/php74/bin/php -m | grep fileinfo
fileinfo

$ /usr/local/php81/bin/php -m | grep fileinfo
fileinfo

$ /usr/local/php82/bin/php -m | grep fileinfo
fileinfo
What's PHP Version are they using ?
 
Maybe trying with basic code to find the cause error.
Code:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

$filename = "image.png";
$finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type - all mimetype extension
echo $filename . ": " . finfo_file( $finfo, $filename ) . "<br>";
finfo_close( $finfo );
?>
 
Maybe trying with basic code to find the cause error.
Code:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

$filename = "image.png";
$finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type - all mimetype extension
echo $filename . ": " . finfo_file( $finfo, $filename ) . "<br>";
finfo_close( $finfo );
?>
WOW Sir TNKS its Work
 
Back
Top