PHP 设置MySQL连接字符集的方法
时间:2021-08-05 08:32:13|栏目:PHP代码|点击: 次
mysql_set_charset()。
这个函数是这样用的:
mysql_set_charset('utf8', $link);
成功返回 TRUE,失败返回 FALSE。
就这么简单。
下面是PHP手册原文
This is the preferred way to change the charset. Using mysql_query() to execute SET NAMES .. is not recommended.
这个函数是这样用的:
mysql_set_charset('utf8', $link);
成功返回 TRUE,失败返回 FALSE。
就这么简单。
下面是PHP手册原文
This is the preferred way to change the charset. Using mysql_query() to execute SET NAMES .. is not recommended.
上一篇:PHP错误Cannot use object of type stdClass as array in错误的解决办法
栏 目:PHP代码
本文标题:PHP 设置MySQL连接字符集的方法
本文地址:http://www.codeinn.net/misctech/164400.html






