We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src/Wechat/Utils/File.php
这里 /** * 根据文件流获取. * * @param string $content 文件流 * * @return string 文件类型 */ public static function getStreamExt($content) { $finfo = new finfo(FILEINFO_MIME); $mime = $finfo->buffer($content); //$mime带有charset信息,不符合键值串,可改为如下 // $mime = strstr($finfo->buffer($content), ';', true); return isset(self::$extensionMap[$mime]) ? self::$extensionMap[$mime] : ''; }
The text was updated successfully, but these errors were encountered:
File MIMT bugfix. #252
9aa1191
File MIMT bugfix. closes #252
b34532b
File MIME bugfix. #252
5b67e42
File MIME bugfix. closes #252
77a7251
No branches or pull requests
src/Wechat/Utils/File.php
这里
/**
* 根据文件流获取.
*
* @param string $content 文件流
*
* @return string 文件类型
*/
public static function getStreamExt($content)
{
$finfo = new finfo(FILEINFO_MIME);
$mime = $finfo->buffer($content); //$mime带有charset信息,不符合键值串,可改为如下
// $mime = strstr($finfo->buffer($content), ';', true);
return isset(self::$extensionMap[$mime]) ? self::$extensionMap[$mime] : '';
}
The text was updated successfully, but these errors were encountered: