function.mb-internal-encoding.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 118 行
HTML
118 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Set/Get internal character encoding</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.mb-http-output.html">mb_http_output</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mb-language.html">mb_language</a></div> <div class="up"><a href="ref.mbstring.html">Multibyte String Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.mb-internal-encoding" class="refentry"> <div class="refnamediv"> <h1 class="refname">mb_internal_encoding</h1> <p class="verinfo">(PHP 4 >= 4.0.6, PHP 5)</p><p class="refpurpose"><span class="refname">mb_internal_encoding</span> — <span class="dc-title">Set/Get internal character encoding</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b><b>mb_internal_encoding</b></b></span> ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$encoding</tt></span> ] )</div> <p class="para rdfs-comment"> Set/Get the internal character encoding </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">encoding</tt></i></span> <dd> <p class="para"> <i><tt class="parameter">encoding</tt></i> is the character encoding name used for the HTTP input character encoding conversion, HTTP output character encoding conversion, and the default character encoding for string functions defined by the mbstring module. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> If <i><tt class="parameter">encoding</tt></i> is set, then Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure. If <i><tt class="parameter">encoding</tt></i> is omitted, then the current character encoding name is returned. </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example"> <p><b>Example #1 <b>mb_internal_encoding()</b> example</b></p> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">/* Set internal character encoding to UTF-8 */<br /></span><span style="color: #0000BB">mb_internal_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* Display current internal character encoding */<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">mb_internal_encoding</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span></span></code></div> </div> </div> </p> </div> <div class="refsect1 notes"> <h3 class="title">Notes</h3> <blockquote><p><b class="note">Note</b>: The internal encoding or the character encoding specified by <a href="function.mb-regex-encoding.html" class="function">mb_regex_encoding()</a> will be used as the character encoding for this function.<br /></p></blockquote> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.mb-http-input.html" class="function" rel="rdfs-seeAlso">mb_http_input()</a></li> <li class="member"><a href="function.mb-http-output.html" class="function" rel="rdfs-seeAlso">mb_http_output()</a></li> <li class="member"><a href="function.mb-detect-order.html" class="function" rel="rdfs-seeAlso">mb_detect_order()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.mb-http-output.html">mb_http_output</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mb-language.html">mb_language</a></div> <div class="up"><a href="ref.mbstring.html">Multibyte String Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?