array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.mb-preferred-mime-name.php', 1 => 'mb_preferred_mime_name', ), 'up' => array ( 0 => 'ref.mbstring.php', 1 => '多字节字符串 函数', ), 'prev' => array ( 0 => 'function.mb-parse-str.php', 1 => 'mb_parse_str', ), 'next' => array ( 0 => 'function.mb-regex-encoding.php', 1 => 'mb_regex_encoding', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/mbstring/functions/mb-preferred-mime-name.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)
mb_preferred_mime_name — 获取 MIME 字符串
encoding
要检查的字符串。
示例 #1 mb_preferred_mime_name() 示例
<?php
$outputenc = "sjis-win";
mb_http_output($outputenc);
ob_start("mb_output_handler");
header("Content-Type: text/html; charset=" . mb_preferred_mime_name($outputenc));
?>