(PHP 5 >= 5.2.3)
mysql_set_charset — Sets the client character set
이 확장은 PHP 5.5.0부터 배제되었고, 차후 제거될 것입니다. 대신, MySQLi나 PDO_MySQL 확장을 사용하십시오. MySQL: API 선택하기 가이드와 관련 FAQ를 참조하십시오. 이 함수를 대체하여:
$charset
[, resource $link_identifier
= NULL
] )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 set it (such as SET NAMES utf8) is not recommended. See the MySQL character set concepts section for more information.