[分享]PHP mysql_set_charset Sets the client character set_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 1930 | 回复: 0   主题: [分享]PHP mysql_set_charset Sets the client character set        下一篇 
huan.liu
注册用户
等级:新兵
经验:72
发帖:58
精华:0
注册:2011-11-23
状态:离线
发送短消息息给huan.liu 加好友    发送短消息息给huan.liu 发消息
发表于: IP:您无权察看 2014-12-10 9:43:43 | [全部帖] [楼主帖] 楼主

 mysql_set_charset
(PHP 5 >= 5.2.3)
mysql_set_charset — Sets the client character set


说明

bool mysql_set_charset ( string $charset [, resource $link_identifier ] )
Sets the default character set for the current connection.


参数

charset
A valid character set name.
link_identifier


MySQL 连接。如不指定连接标识,则使用由 mysql_connect() 最近打开的连接。如果没有找到该连接,会尝试不带参数调用 mysql_connect() 来创建。如没有找到连接或无法建立连接,则会生成 E_WARNING 级别的错误。

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE.

注释

Note:
This function requires MySQL 5.0.7 or later.
Note:
This is the preferred way to change the charset. Using mysql_query() to execute SET NAMES .. is not recommended.


参见

mysql_client_encoding() - 返回字符集的名称

» List of character sets that MySQL supports


--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论