Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
尝试设置 PHP<->MySQL-connection 字符集。
如果您使用的是旧的 MySQL API,请使用mysql_set_charset('utf8_unicode_ci')(更多)。 如果您使用 MySQLi API,请使用$mysqli->set_charset('utf8_unicode_ci')(更多)。
mysql_set_charset('utf8_unicode_ci')
$mysqli->set_charset('utf8_unicode_ci')
我还发现$mysqli->query('utf8')可以工作(在这里)......
$mysqli->query('utf8')
$mysqli->set_charset("utf8");