2010-04-27 60 views

回答

0

您需要指定您使用的字符集作为htmlentities()的第三个参数。默认字符集是iso-8859-1。如果您使用UTF-8为您的数据,你需要这样说:

$result = htmlentities($string, ENT_QUOTES, "UTF-8"); 
1

确保您的页面字符集设置为utf-8

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />