How can you determine the file type of a file extracted from a .zip file in PHP?
When a file is extracted from a .zip file in PHP, you can determine its file type by using the `finfo` extension. This extension allows you to retrieve information about a file's type by examining its contents. You can use the `finfo_file()` function to get the MIME type of the extracted file.
$filePath = 'path/to/extracted/file';
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$fileType = finfo_file($finfo, $filePath);
finfo_close($finfo);
echo "The file type is: " . $fileType;