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.
以上就介绍了白花蛇舌草的功效与作用及食用方法 php 设置mysql连接字符集的方法,包括了白花蛇舌草的功效与作用及食用方法方面的内容,希望对php教程有兴趣的朋友有所帮助。