⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.mysql-set-charset.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Sets the client character set</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.mysql-select-db.html">mysql_select_db</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mysql-stat.html">mysql_stat</a></div> <div class="up"><a href="ref.mysql.html">MySQL Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.mysql-set-charset" class="refentry"> <div class="refnamediv">  <h1 class="refname">mysql_set_charset</h1>  <p class="verinfo">(PHP 5 &gt;= 5.2.3)</p><p class="refpurpose"><span class="refname">mysql_set_charset</span> &mdash; <span class="dc-title">Sets the client character set</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">bool</span> <span class="methodname"><b><b>mysql_set_charset</b></b></span>    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$charset</tt></span>   [, <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$link_identifier</tt></span>  ] )</div>  <p class="para rdfs-comment">   Sets the default character set for the current connection.   </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">charset</tt></i></span>     <dd>      <p class="para">       A valid character set name.      </p>     </dd>    </dt>    <dt><span class="term"><i><tt class="parameter">link_identifier</tt></i></span><dd><p class="para">The MySQL connection. If the link identifier is not specified, the last link opened by <a href="function.mysql-connect.html" class="function">mysql_connect()</a> is assumed. If no such link is found, itwill try to create one as if <a href="function.mysql-connect.html" class="function">mysql_connect()</a> was calledwith no arguments. If by chance no connection is found or established, an<b><tt>E_WARNING</tt></b> level error is generated.</p></dd></dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure.  </p> </div> <div class="refsect1 notes">  <h3 class="title">Notes</h3>  <blockquote><p><b class="note">Note</b>:        This function requires MySQL 5.0.7 or later.   <br />  </p></blockquote>  <blockquote><p><b class="note">Note</b>:        This is the preferred way to change the charset. Using    <a href="function.mysql-query.html" class="function">mysql_query()</a> to execute <i>SET NAMES ..</i>    is not reccomended.   <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.mysql-client-encoding.html" class="function" rel="rdfs-seeAlso">mysql_client_encoding()</a></li>    <li class="member"><a href="http://dev.mysql.com/doc/refman/5.1/en/charset-charsets.html" class="link external">&raquo; List of character sets that MySQL supports</a></li>   </ul>  </p> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.mysql-select-db.html">mysql_select_db</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mysql-stat.html">mysql_stat</a></div> <div class="up"><a href="ref.mysql.html">MySQL Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -