PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<mysql_change_usermysql_close>
Last updated: Mon, 16 Jul 2012

mysql_client_encoding

(PHP 4 >= 4.3.0, PHP 5)

mysql_client_encoding -- 返回字符集的名称

说明

int mysql_client_encoding ( [resource link_identifier] )

mysql_client_encoding() 返回当前连接的默认字符集名称。

例子 1. mysql_client_encoding() 例子

<?php
$link
= mysql_connect('localhost', 'mysql_user', 'mysql_password');
$charset = mysql_client_encoding($link);
printf ("current character set is %s\n", $charset);
?>

以上例子将产生如下输出:

current character set is latin1

参见 mysql_real_escape_string()




<mysql_change_usermysql_close>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST